ColdDeath Posted November 21, 2008 Share Posted November 21, 2008 I want the script to sleep, until SatusBar says "Gereed". The problem is that is allways say "Gereed", until I click the link. Also, I want to add a counter of some sort. The script I use is for a turn based site, every 8 seconds you get a turn, and I need 5 turns to preform an action, that's 40 seconds. When the scripts starts, the timer will activate. And will only preform the last click when the 40 seconds have expired. Sleep ( 500 ) WinActivate ( '(SFGC) Galactic Conquest - Windows Internet Explorer' ) WinWaitActive ( '(SFGC) Galactic Conquest - Windows Internet Explorer' ) StatusbarGetText ("Gereed") MouseClick ( "left", 402, 392 ) Sleep(500) StatusbarGetText ("Gereed") MouseClick ( "left", 898, 395 ) Sleep(500) StatusbarGetText ("Gereed") Sleep(1000) MouseClickDrag ( "left", 900, 321, 700, 321 ) I don't know a lot of AutoIt, so please explain every step you've taken. Link to comment Share on other sites More sharing options...
dbzfanatic Posted November 21, 2008 Share Posted November 21, 2008 Please read the helpfile. There are timer functions as well as everything else you should need. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
ColdDeath Posted November 21, 2008 Author Share Posted November 21, 2008 Please read the helpfile. There are timer functions as well as everything else you should need.Ah! Got the timer .Only the StatusBarGetText is unclear for me. Link to comment Share on other sites More sharing options...
toonboon Posted November 21, 2008 Share Posted November 21, 2008 If StatusBarGetText("Internet Explorer")="gereed" Then ;; do stuff EndIf do you mean it like this? [right]~What can I say, I'm a Simplistic person[/right] Link to comment Share on other sites More sharing options...
Andreik Posted November 21, 2008 Share Posted November 21, 2008 If StatusBarGetText("Internet Explorer")="gereed" Then ;; do stuff EndIf do you mean it like this?Full title or in your case with AutoItSetOption("WinTitleMatchMode",2) . When the words fail... music speaks. Link to comment Share on other sites More sharing options...
toonboon Posted November 21, 2008 Share Posted November 21, 2008 That's not that big of a deal it was just some short simple piece of coding I quickly qrote down. [right]~What can I say, I'm a Simplistic person[/right] Link to comment Share on other sites More sharing options...
ColdDeath Posted November 21, 2008 Author Share Posted November 21, 2008 (edited) I keep getting an error that WEnd has no matching While statement :S When I erase all WEnd the While doesn't have a matching WEnd statement :S expandcollapse popupSleep ( 500 ) WinActivate ( '(SFGC) Galactic Conquest - Windows Internet Explorer' ) WinWaitActive ( '(SFGC) Galactic Conquest - Windows Internet Explorer' ) Send ("{F5}") Send ("{ENTER}") While Sleep (10) If StatusBarGetText("(SFGC) Galactic Conquest - Windows Internet Explorer")="Gereed" Then MouseClick ( "left", 402, 392 ) MouseMove (300,300) Sleep(500) WEnd While Sleep (10) If StatusBarGetText("(SFGC) Galactic Conquest - Windows Internet Explorer")="Gereed" Then MouseClick ( "left", 898, 395 ) MouseMove (300,300) Sleep(500) WEnd While Sleep (10) If StatusBarGetText("(SFGC) Galactic Conquest - Windows Internet Explorer")="Gereed" Then Sleep(1000) MouseClick ( "left", 772, 300, 3 ) Send ( " ^c " ) Sleep ( 500 ) WinActivate ( 'Planet Checker' ) WinWaitActive ( 'Planet Checker' ) Send ( " ^v " ) Sleep ( 500 ) Send("{BACKSPACE 2}") Send("{LEFT 3}") . Send("{BACKSPACE 5}") Sleep(500) Send("{ENTER}") WinActivate ( '(SFGC) Galactic Conquest - Windows Internet Explorer' ) WinWaitActive ( '(SFGC) Galactic Conquest - Windows Internet Explorer' ) MouseClick ( "left", 772, 280, 3 ) Sleep ( 500 ) Send ( " ^c " ) Sleep ( 50 ) WinActivate ( 'Planet Checker' ) WinWaitActive ( 'Planet Checker' ) Send ( " ^v " ) Sleep(500) Send("{BACKSPACE 7}") Send("{LEFT}") Send("{BACKSPACE 21}") Sleep(500) Send("{ENTER}") WEnd Edited November 21, 2008 by ColdDeath Link to comment Share on other sites More sharing options...
youknowwho4eva Posted November 21, 2008 Share Posted November 21, 2008 (edited) Out of control isn't a good description to help find a solution. Where does it stop doing as expected? What does it do that you think it shouldn't do? Edit: you musta read my mind and changed it Thats because your If loop isn't closed Edited November 21, 2008 by youknowwho4eva Giggity Link to comment Share on other sites More sharing options...
ColdDeath Posted November 21, 2008 Author Share Posted November 21, 2008 Out of control isn't a good description to help find a solution. Where does it stop doing as expected? What does it do that you think it shouldn't do? Edit: you musta read my mind and changed it Thats because your If loop isn't closed Okay, fixed it. The only problem is that it keeps repeating, when it has pressed enter, it goes into a loop, and repeats every step taken... expandcollapse popupSleep ( 500 ) WinActivate ( '(SFGC) Galactic Conquest - Windows Internet Explorer' ) WinWaitActive ( '(SFGC) Galactic Conquest - Windows Internet Explorer' ) Send ("{F5}") Send ("{ENTER}") While Sleep (10) If StatusBarGetText("(SFGC) Galactic Conquest - Windows Internet Explorer")="Gereed" Then MouseClick ( "left", 402, 392 ) MouseMove (300,300) Sleep(500) While Sleep (10) If StatusBarGetText("(SFGC) Galactic Conquest - Windows Internet Explorer")="Gereed" Then MouseClick ( "left", 898, 395 ) MouseMove (300,300) Sleep(500) While Sleep (10) If StatusBarGetText("(SFGC) Galactic Conquest - Windows Internet Explorer")="Gereed" Then Sleep(1000) MouseClick ( "left", 800, 300, 3 ) Send ( " ^c " ) Sleep ( 500 ) WinActivate ( 'Planet Checker' ) WinWaitActive ( 'Planet Checker' ) Send ( " ^v " ) Sleep ( 500 ) Send("{BACKSPACE 2}") Send("{LEFT 3}") Send("{BACKSPACE 21}") Sleep(500) Send("{ENTER}") Sleep(500) WinActivate ( '(SFGC) Galactic Conquest - Windows Internet Explorer' ) WinWaitActive ( '(SFGC) Galactic Conquest - Windows Internet Explorer' ) MouseClick ( "left", 800, 280, 3 ) Sleep ( 500 ) Send ( " ^c " ) Sleep ( 50 ) WinActivate ( 'Planet Checker' ) WinWaitActive ( 'Planet Checker' ) Send ( " ^v " ) Sleep(500) Send("{BACKSPACE 7}") Send("{LEFT}") Send("{BACKSPACE 21}") Sleep(500) Send("{ENTER}") ExitLoop EndIf WEnd EndIf WEnd EndIf WEnd 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