ellysh / l2bot

Simple and easy configurable Lineage 2 bot on AutoIt scripting language
http://en-l2bot.blogspot.com
GNU General Public License v3.0
35 stars 26 forks source link

bot loosing lineage2 window focus after some time #6

Open AHANO opened 7 years ago

AHANO commented 7 years ago

The bot works good for a certain time but looses focus for one moment something like alt+tabbing for some time then returns to the l2 process but then the bot stops!

ellysh commented 7 years ago

Bot can read pixels from the active window only. If you switch to another window or minimize the Lineage window it will not work.

There is the issue in the AutoIt bugzilla about it: https://www.autoitscript.com/trac/autoit/ticket/3127

AHANO commented 7 years ago

My excuses for being unclear. I meant that the bot loses focus by itself without my interaction.

ellysh commented 7 years ago

Does bot switches to another windows and type command "/target" there? In theory, it can be an effect of the protection system.

AHANO commented 7 years ago

No it works and after some time sometimes after 1 minute sometimes after 30 minutes the lineage2 program looses focus and then the script just stops , i have seen that the time depends on the configuration of the points and sometimes on spot i am farming in

ellysh commented 7 years ago

Can you try to reproduce this issue in the Notepad window? Just open the Notepad and start the bot. If this is a bug in bot application the problem should be reproduced.

AHANO commented 7 years ago

after running the script in notepad for ~30 minutes the program keeps running without stopping but it seems that the script presses the alt button. I assume that somewhere in the script there is a possible alt+tab combination although i didn't change the destroyer.au3 script

ellysh commented 7 years ago

I have checked the source code. Bot does not press Alt button explicitly. Probably, you have some influence of another application? Sometimes Windows feature to automatically switch a keyboard layout can cause strange effects like you have.

AHANO commented 6 years ago

i will test it on another pc and i will post results

rpetersson commented 5 years ago

Indeed looks like ALT key is pressed automaticly when running the script in Notepad. Underlines the top menu text in notepad, just like when you press ALT.