For dual boxing guildwars i have the following function to make my second character follow my main character. it works good but the problem is that when it's sending the controlsend("Guild Wars Sec", "", "", "={space}") to my second guildwars window, it sometimes makes my wasd keys on my main guildwars window hang. with other scripts i've wrote with controlsend i've had the same problem. like if you alt tab out of your game to firefox sometimes your alt key hangs. increasing the sleep helps in the hang not occuring so often but it still does a bit.
this hanging would also probably occur if you just open 2 notepad windows and controlsend alot of text to 1 notepad window with a loop and try to type a few long sentences in the other notepad window
this is my function:
i've also tried to reduce the hanging with the timer function so it doesn't send the keys as often and it helps but in my main window the keys still hang sometimes
Func Followmain ()
$begintimer = TimerInit()
while 1
sleep(50)
if TimerDiff($begintimer) > 500 Then
controlsend("Guild Wars Sec", "", "", "={space}")
$begintimer = TimerInit()
EndIf
If _IsPressed("56", $dll) Then;v
checkforpresses ()
EndIf
If _IsPressed("43", $dll) Then;c
dpslikemadstart ()
EndIf
WEnd
endfunc
i thought maybe it was something like when you press alot of keys on your keyboard at the same time it doesn't work, but that is probably not the case here since autoit is not using the keyboard but the winapi or something.
Does anyone have any solution for this problem? or anyone even ever had this problem?