thrlride Posted September 10, 2009 Share Posted September 10, 2009 (edited) I'm sure this has been covered in many posts on the forum but I'm terrible at searching and finding what I need. What I'm trying to do is simply run my script a set amount of times. My code is below. Run("C:\Program Files (x86)\Mozilla Firefox\firefox.exe http://www.dragonmastersworld.com/building/attempt_buy?building_id=1001&quantity=15") $hFF = WinGetHandle('[CLASS:MozillaUIWindowClass]') WinWaitActive('[CLASS:MozillaUIWindowClass]') sleep(2000) ControlSend($hFF, '', '', '^{F4}') Can someone please instruct me or edit my script to show me how to loop it 10 times? Thank you so much for your help! Edited September 10, 2009 by thrlride Link to comment Share on other sites More sharing options...
nfaustin Posted September 10, 2009 Share Posted September 10, 2009 How about this $times = 10 For $i = 1 to $times Run("C:\Program Files (x86)\Mozilla Firefox\firefox.exe http://www.dragonmastersworld.com/building/attempt_buy?building_id=1001&quantity=15") $hFF = WinGetHandle('[CLASS:MozillaUIWindowClass]') WinWaitActive('[CLASS:MozillaUIWindowClass]') sleep(2000) ControlSend($hFF, '', '', '^{F4}') Next [font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font] Link to comment Share on other sites More sharing options...
thrlride Posted September 11, 2009 Author Share Posted September 11, 2009 Thanks! I'll try that and report back if it works for me. 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