Gursky Posted July 1, 2006 Share Posted July 1, 2006 I have managed to write my very first script successfully. By successfully I mean that I have been able to start the internet, go to a website, log in, go to a forum, and post a reply. My question is; How do i get my AutoIt to loop the post reply command? I dont want it to start from the beginning. Please keep in mind that my scripting is horrible and very basic but it does what I need it to do. If you help me out, i personally give you permission to laugh at me... Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE") ;Start Internet Explorer WinWaitActive("Adelphia.net - Home - Microsoft Internet Explorer") Controlclick("Adelphia.net - Home - Microsoft Internet Explorer","","Edit3") ;click address bar Send("http://www.gaiaonline.com") Send("{ENTER}") WinWaitActive("Gaia :: Welcome to Gaia Online - Microsoft Internet Explorer") Sleep(5000) ;tab 7 Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("MYUSERNAME") Send("{TAB}") Send("MYPASSWORD") Send("{ENTER}") Sleep(5000) WinWaitActive("Gaia :: Welcome to Gaia - Microsoft Internet Explorer") Controlclick("Gaia :: Welcome to Gaia - Microsoft Internet Explorer","","Edit3") Send("http://www.gaiaonline.com/forum/viewtopic.php?t=15189099") Send("{ENTER}") WinWaitActive("Gaia :: BUMP MANIA - Microsoft Internet Explorer") Sleep(5000) Controlclick("Gaia :: BUMP MANIA - Microsoft Internet Explorer","","Edit3") Send("{ctrl+a}") Send("{BACKSPACE}") Send("http://www.gaiaonline.com/forum/posting.php?mode=reply&tc=" & int(Random ( 100, 999 )) & "&t=15189099") Send("{ENTER}") WinWaitActive("Gaia :: Forums - Post a Reply - Microsoft Internet Explorer") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("bump") ;tab 83 Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{TAB}") Send("{ENTER}") Sleep(10000) Link to comment Share on other sites More sharing options...
Valuater Posted July 1, 2006 Share Posted July 1, 2006 maybe expandcollapse popupWhile 1 $pid = Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE") ;Start Internet Explorer WinWaitActive("Adelphia.net - Home - Microsoft Internet Explorer") ControlClick("Adelphia.net - Home - Microsoft Internet Explorer", "", "Edit3") ;click address bar Send("http://www.gaiaonline.com") Send("{ENTER}") WinWaitActive("Gaia :: Welcome to Gaia Online - Microsoft Internet Explorer") Sleep(5000) Send("{TAB 7}") Send("MYUSERNAME") Send("{TAB}") Send("MYPASSWORD") Send("{ENTER}") Sleep(5000) WinWaitActive("Gaia :: Welcome to Gaia - Microsoft Internet Explorer") ControlClick("Gaia :: Welcome to Gaia - Microsoft Internet Explorer", "", "Edit3") Send("http://www.gaiaonline.com/forum/viewtopic.php?t=15189099") Send("{ENTER}") WinWaitActive("Gaia :: BUMP MANIA - Microsoft Internet Explorer") Sleep(5000) ControlClick("Gaia :: BUMP MANIA - Microsoft Internet Explorer", "", "Edit3") Send("{ctrl+a}") Send("{BACKSPACE}") Send("http://www.gaiaonline.com/forum/posting.php?mode=reply&tc=" & Int(Random(100, 999)) & "&t=15189099") Send("{ENTER}") WinWaitActive("Gaia :: Forums - Post a Reply - Microsoft Internet Explorer") Send("{TAB 5}") Send("bump") For $x = 1 To 84 Send("{TAB}") Next Send("{ENTER}") Sleep(10000) ProcessClose($pid) WEnd ******* not tested 8) Link to comment Share on other sites More sharing options...
Josbe Posted July 1, 2006 Share Posted July 1, 2006 Tip: Also, you can repeat a keystroke:Send("{TAB 84}") AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
w0uter Posted July 1, 2006 Share Posted July 1, 2006 (edited) {ctrl+a} is wrong AFAIK. Edited July 1, 2006 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll 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