Busser Posted November 30, 2008 Share Posted November 30, 2008 Hi i was wandering if it is possible 2 and if so how would i Question 1 if i press 1 it runs Func Talic() 1 times if i press 2 it runs Func Talic() 2 times ect..... but then after i press 2 when that function is done i can press 1 and then it will godo it 1 times then press 3 it will do it 3 times ect..... Question 2 Is there was way it to run a func 1 time then have the a func run 2 times then go back 2, 1 time then repeat that over and over Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 30, 2008 Share Posted November 30, 2008 Hi i was wandering if it is possible 2 and if so how would i Question 1if i press 1 it runs Func Talic() 1 timesif i press 2 it runs Func Talic() 2 times ect.....but then after i press 2 when that function is done i can press 1 and then it will godo it 1 times then press 3 it will do it 3 times ect.....Question 2Is there was way it to run a func 1 time then have the a func run 2 times then go back 2, 1 time then repeat that over and overHotKeySet() for running things on a key press.For/Next loops to repeat things.Look those functions up in the help file and try it out. If you get stuck, post what you tried. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Busser Posted December 1, 2008 Author Share Posted December 1, 2008 Ok i made something based off of what i had b4 and it worked but now when i do it wheni hit 1 it just grabs the talic and puts it where it is to go and then goes tries to gab it again it doesn't continue with what it is to be doing if i take that and run it normal with while 1 in there it works great if anyone could help me that would be cool and if you know a better way of doing this would be also a good learning i have it so if i it 1 it does it 1 times hit 2 it does it 2 times up to 4 and then if it hit 5 it will do 4 times in each of the boxes that is why there is a few differnt things there CODEWinActivate("RF Online", "") WinMove("RF Online", "", 0, 0) Global $Paused HotKeySet("{HOME}", "TogglePause") HotKeySet("{END}", "Terminate") HotKeySet("{1}", "Talic1") HotKeySet("{2}", "Talic2") HotKeySet("{3}", "Talic3") HotKeySet("{4}", "Talic4") HotKeySet("{5}", "Talic5") While 1 sleep("10000"); Idle, will start when you press something WEnd If 1 = 1 Then WinActivate("RF Online", "") EndIf Func Talic1() For $i = 1 To 1 ; Runs it 1 time Call("Talic") ; Calls (Runs) Func "?" Next EndFunc Func Talic2() For $i = 1 To 2 ; Runs it 2 time Call("Talic") ; Calls (Runs) Func "?" Next EndFunc Func Talic3() For $i = 1 To 3 ; Runs it 3 time Call("Talic") ; Calls (Runs) Func "?" Next EndFunc Func Talic4() For $i = 1 To 4 ; Runs it 4 time Call("Talic") ; Calls (Runs) Func "?" Next EndFunc Func Talic5() For $i = 1 To 4 ; Runs it 4 time Call("Talic") ; Calls (Runs) Func "?" Next For $i = 1 To 4 ; Runs it 4 time Call("Talic2a") ; Calls (Runs) Func "?" Next For $i = 1 To 4 ; Runs it 4 time Call("Talic3a") ; Calls (Runs) Func "?" Next For $i = 1 To 4 ; Runs it 4 time Call("Talic4a") ; Calls (Runs) Func "?" Next For $i = 1 To 4 ; Runs it 4 time Call("Talic5a") ; Calls (Runs) Func "?" Next EndFunc Func Talic() MouseMove(1490, 469) ; Talic in bag MouseClick("left") MouseMove(846, 460) ; Talic In combation winodw MouseClick("left") Sleep (100) ;-------------------------- Send("{2}") ; Enters 20 then hits enter Sleep (100) ; Send("{0} {Enter}") ;-------------------------- MouseMove(843, 555) ; Start Button MouseClick("left") MouseMove(907, 577) ; Saying Yes to pay money MouseClick("left") Sleep (3750) ; Sleeps 5 secs while it does it stuff MouseMove(1003, 643) ; Clicks Continue MouseClick("left") EndFunc Func Talic2a() MouseMove(1530, 466) ; Talic in bag MouseClick("left") MouseMove(846, 460) ; Talic In combation winodw MouseClick("left") Sleep (100) ;-------------------------- Send("{2}") ; Enters 20 then hits enter Sleep (100) ; Send("{0} {Enter}") ;-------------------------- MouseMove(843, 555) ; Start Button MouseClick("left") MouseMove(907, 577) ; Saying Yes to pay money MouseClick("left") Sleep (3750) ; Sleeps 5 secs while it does it stuff MouseMove(1003, 643) ; Clicks Continue MouseClick("left") EndFunc Func Talic3a() MouseMove(1572, 466) ; Talic in bag MouseClick("left") MouseMove(846, 460) ; Talic In combation winodw MouseClick("left") Sleep (100) ;-------------------------- Send("{2}") ; Enters 20 then hits enter Sleep (100) ; Send("{0} {Enter}") ;-------------------------- MouseMove(843, 555) ; Start Button MouseClick("left") MouseMove(907, 577) ; Saying Yes to pay money MouseClick("left") Sleep (3750) ; Sleeps 5 secs while it does it stuff MouseMove(1003, 643) ; Clicks Continue MouseClick("left") EndFunc Func Talic4a() MouseMove(1609, 466) ; Talic in bag MouseClick("left") MouseMove(846, 460) ; Talic In combation winodw MouseClick("left") Sleep (100) ;-------------------------- Send("{2}") ; Enters 20 then hits enter Sleep (100) ; Send("{0} {Enter}") ;-------------------------- MouseMove(843, 555) ; Start Button MouseClick("left") MouseMove(907, 577) ; Saying Yes to pay money MouseClick("left") Sleep (3750) ; Sleeps 5 secs while it does it stuff MouseMove(1003, 643) ; Clicks Continue MouseClick("left") EndFunc Func Talic5a() MouseMove(1640, 466) ; Talic in bag MouseClick("left") MouseMove(846, 460) ; Talic In combation winodw MouseClick("left") Sleep (100) ;-------------------------- Send("{2}") ; Enters 20 then hits enter Sleep (100) ; Send("{0} {Enter}") ;-------------------------- MouseMove(843, 555) ; Start Button MouseClick("left") MouseMove(907, 577) ; Saying Yes to pay money MouseClick("left") Sleep (3750) ; Sleeps 5 secs while it does it stuff MouseMove(1003, 643) ; Clicks Continue MouseClick("left") EndFunc Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit EndFunc thank you for all that help and look at it Link to comment Share on other sites More sharing options...
Busser Posted December 1, 2008 Author Share Posted December 1, 2008 here is the original that works great it runs thru the whole thing perfectly CODEWinActivate("RF Online", "") WinMove("RF Online", "", 0, 0) Global $Paused HotKeySet("{HOME}", "TogglePause") HotKeySet("{END}", "Terminate") If 1 = 1 Then WinActivate("RF Online", "") While 1= 1 Sleep(1500) MouseMove(1490, 469) ; Talic in bag MouseClick("left") MouseMove(846, 460) ; Talic In combation winodw MouseClick("left") Sleep (100) ;-------------------------- Send("{2}") ; Enters 20 then hits enter Sleep (100) ; Send("{0} {Enter}") ;-------------------------- MouseMove(843, 555) ; Start Button MouseClick("left") MouseMove(907, 577) ; Saying Yes to pay money MouseClick("left") Sleep (3750) ; Sleeps 5 secs while it does it stuff MouseMove(1003, 643) ; Clicks Continue MouseClick("left") Sleep (2000) WEnd EndIf Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc But when i do it in the other one it just goes grabs the talic out of bag and then puts it where it is to go then goes tries to grab a talic again it is not goign thru the whoel thing it is missing stuff dont know why Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 1, 2008 Share Posted December 1, 2008 Well, this unconditionally runs: If 1 = 1 Then WinActivate("RF Online", "") EndIf So it's the same thing as just: WinActivate("RF Online", "") However, it never gets done at all, because the script is trapped in the While/WEnd loop before it gets there. Move that line above the While/WEnd loop. I don't generally mess with game scripts so I'm done here, but there are other gamers on the forum who can help if you need more. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Busser Posted December 1, 2008 Author Share Posted December 1, 2008 ya i have looked over the top one and can't figure out why it jsut wants to do the this CODEMouseMove(1490, 469) ; Talic in bag MouseClick("left") MouseMove(846, 460) ; Talic In combation winodw MouseClick("left") over and over and will not go passed that and continue with the rest of the code and it does'nt matter what i press 1 2 3 4 5 does the same thing with everyone but hte original works fine it run normal the way it was to be repeat its self over and over but hte new one is not working prperly so if someone could help that would be great thank you Link to comment Share on other sites More sharing options...
Busser Posted December 5, 2008 Author Share Posted December 5, 2008 So nobody has any ideas Link to comment Share on other sites More sharing options...
FireFox Posted December 5, 2008 Share Posted December 5, 2008 why it jsut wants to do the thisHi,I don't understand this sentence (on first read) : Editing post exists Can you explain more what you want to do please 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