Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 17:11

  • Please register to post and access all features, it's quick, easy and FREE!


AutoIt Help

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2007
Posts: 107
Received Thanks: 27
AutoIt Help

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



fdragon is offline  
Old 10/07/2007, 17:03   #2
 
elite*gold: 0
Join Date: Mar 2007
Posts: 568
Received Thanks: 49
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?


Ganf is offline  
Old 10/16/2007, 14:58   #3
 
elite*gold: 0
Join Date: Oct 2005
Posts: 2,471
Received Thanks: 209
I think he wonders why the special letter is sent in IE, Word etc. but not in a game.
Term!nX is offline  
Reply



« Autoit srobot starten | Autoit Tutorial »



All times are GMT +1. The time now is 17:11.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.