AutoIt Help

10/07/2007 14:25 fdragon#1
i've made this little macro for autoattack in 2moons but i've still a problem
basically it works it send ò in notepad in word, in IE but not in any game? why? and doest it only send the letter or its like i've pressed the key?

HotKeySet("+{F9}", "_Terminate") ;
While 1
If WinActive("2moons") Then
sleep(1000)
Send('{ò}')
Else
EndIf
WEnd

Func _Terminate()
Exit
EndFunc
10/07/2007 17:03 Ganf#2
You mean, AutoIt shall send a Keypress to InternetExplorer but only if 2moons is Active?

Code:
HotKeySet("+{F9}", "_Terminate") ;
Call("Test")

Func Test()
     While 1
          If WinActivate("2moons") Then
               Sleep(1000)
               Send('{ò}')
          Else
               Sleep(500)
          EndIf
     WEnd
EndFunc

Func _Terminate()
     Exit
EndFunc

OK, you can delete the "Else" because if you do not write some code for else, you will net need it! But here the while will ckeck every 500 millisecund if 2moons runs and active. If it is active it will sleep 1 secund and will send "o". If not it will sleep half an secund and check again!

BUT, please give me an example what you want to do?
10/16/2007 14:58 Term!nX#3
I think he wonders why the special letter is sent in IE, Word etc. but not in a game.