hawky Posted July 25, 2007 Share Posted July 25, 2007 (edited) Hello everybody, i made a script that repeat hes self,if i push on Home on my keyboard it does something(F1 or it say something)now i want when i push Page Up that it does something too but when i run the script it say:---------------------------AutoIt Error---------------------------Line 42 (File "C:\Downloads\click botje.au3"):if $sendf2 == "1" Thenif ^ ERRORError: Variable used without being declared.---------------------------OK ---------------------------if someone have another methode of scripting say it pleasehere is my script:expandcollapse popupGlobal $sendf1 HotKeySet("{ESC}", "Terminate") HotKeySet("{HOME}", "startp") HotKeySet("{Ins}", "pauze") HotKeySet("{PGUP}", "startp2") While 1 Sleep(100) if $sendf1 == "1" Then Send("hoer") Send("{ENTER}") EndIf WEnd While 1 Sleep(100) if $sendf2 == "1" Then Send("hoer") Send("{ENTER}") EndIf WEnd Func Terminate() Exit 0 EndFunc Func startp() if $sendf1 == "1" Then $sendf1="0" else $sendf1="1" EndIf EndFunc Func startp2() if $sendf2 == "1" Then $sendf2="0" else $sendf2="1" EndIf EndFunc Func pauze() Endfuncthis is the code with the error and this without error:Global $sendf1 HotKeySet("{ESC}", "Terminate") HotKeySet("{HOME}", "startp") HotKeySet("{Ins}", "pauze") While 1 Sleep(100) if $sendf1 == "1" Then Send("hoer") Send("{ENTER}") EndIf WEnd Func Terminate() Exit 0 EndFunc Func startp() if $sendf1 == "1" Then $sendf1="0" else $sendf1="1" EndIf EndFunc Func pauze() Endfunc Edited July 25, 2007 by hawky Link to comment Share on other sites More sharing options...
narayanjr Posted July 25, 2007 Share Posted July 25, 2007 (edited) Global $sendf2 you need to add that to the top just like you did for Global $sendf1 that will get rid of the not declared problem and thecommented While statement is never being hit you should combine both while statements together like so While 1 Sleep(100) if $sendf1 == "1" Then Send("hoer") Send("{ENTER}") EndIf if $sendf2 == "1" Then Send("hoer") Send("{ENTER}") EndIf WEndoÝ÷ Ù«¢+Ù±½°ÀÌØí͹Ä)±½°ÀÌØí͹È)!½Ñ-åMÐ ÅÕ½ÐííM ôÅÕ½Ðì°ÅÕ½ÐíQɵ¥¹ÑÅÕ½Ðì¤)!½Ñ-åMÐ ÅÕ½Ðíí!=5ôÅÕ½Ðì°ÅÕ½ÐíÍÑÉÑÀÅÕ½Ðì¤)!½Ñ-åMÐ ÅÕ½Ðíí%¹ÍôÅÕ½Ðì°ÅÕ½ÐíÁÕéÅÕ½Ðì¤)!½Ñ-åMÐ ÅÕ½ÐííAUAôÅÕ½Ðì°ÅÕ½ÐíÍÑÉÑÀÈÅÕ½Ðì¤()]¡¥±Ä(M±À ÄÀÀ¤(¥ÀÌØí͹ÄôôÅÕ½ÐìÄÅÕ½ÐìQ¡¸)M¹ ÅÕ½Ðí¡½ÈÅÕ½Ðì¤)M¹ ÅÕ½Ðíí9QIôÅÕ½Ðì¤(¹%)]¹(Ì)]¡¥±Ä(M±À ÄÀÀ¤(¥ÀÌØí͹ÈôôÅÕ½ÐìÄÅÕ½ÐìQ¡¸)M¹ ÅÕ½Ðí¡½ÈÅÕ½Ðì¤)M¹ ÅÕ½Ðíí9QIôÅÕ½Ðì¤(¹%)]¹()Õ¹Qɵ¥¹Ñ ¤(á¥ÐÀ)¹Õ¹()Õ¹ÍÑÉÑÀ ¤(¥ÀÌØí͹ÄôôÅÕ½ÐìÄÅÕ½ÐìQ¡¸(ÀÌØí͹ÄôÅÕ½ÐìÀÅÕ½Ðì(±Í(ÀÌØí͹ÄôÅÕ½ÐìÄÅÕ½Ðì)¹%)¹Õ¹()Õ¹ÍÑÉÑÀÈ ¤(¥ÀÌØí͹ÈôôÅÕ½ÐìÄÅÕ½ÐìQ¡¸(ÀÌØí͹ÈôÅÕ½ÐìÀÅÕ½Ðì(±Í(ÀÌØí͹ÈôÅÕ½ÐìÄÅÕ½Ðì)¹%)¹Õ¹()Õ¹ÁÕé ¤()¹Õ¹ Edited July 25, 2007 by narayanjr Link to comment Share on other sites More sharing options...
Developers Jos Posted July 25, 2007 Developers Share Posted July 25, 2007 Send("hoer")mmm wonder what this script is all about ..... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
hawky Posted July 25, 2007 Author Share Posted July 25, 2007 mmm wonder what this script is all about .....lol its just for my game lineage 2, i make simple heal botsif i push home i target myself and heal the healer and when pgup i heal my other charand yes im dutch haha Link to comment Share on other sites More sharing options...
hawky Posted July 25, 2007 Author Share Posted July 25, 2007 (edited) Ok problem fixed (thanks too narayanjr) i made 1 while thing aah whatever look self: expandcollapse popupGlobal $sendf1 Global $sendf2 HotKeySet("{ESC}", "Terminate") HotKeySet("{HOME}", "startp") HotKeySet("{Ins}", "pauze") HotKeySet("{PGDN}", "startp2") While 1 Sleep(100) if $sendf1 == "1" Then Send("test") Send("{ENTER}") EndIf Sleep(100) if $sendf2 == "1" Then Send("test") Send("{ENTER}") EndIf WEnd Func Terminate() Exit 0 EndFunc Func startp() if $sendf1 == "1" Then $sendf1="0" else $sendf1="1" EndIf EndFunc Func startp2() if $sendf2 == "1" Then $sendf2="0" else $sendf2="1" EndIf EndFunc Func pauze() Endfunc Edited July 25, 2007 by hawky Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now