JuggaloZeke Posted April 24, 2008 Share Posted April 24, 2008 (edited) I'm not quite sure how to describe what I'm trying to do so it has made it difficult to search for answers.... basically, I've got a script built that I'd like to visit specific URLs at different intervals. I just can't figure out how to implement it into the script without putting each one in individually making my script 16x bigger than it needs to be. Here is what I'm trying to implement... $count = 1 $oMMC = _IECreate ("about:blank") While 1 _IENavigate ($oMMC, "http://myurl.com" & $counturl) $count = $count+1 If $count = 17 Then $count = 1 WEnd ;URL1="/" - 1, 4, 8, 11 - URL1 needs to be used on the 1st, 4th, 8th, and 11th loop. ;URL2="/ind" - 6, 13 - URL2 needs to be used on the 6th and 13th loop. ;URL3="/tra" - 16 - URL3 needs to be used on the 16th loop (and then reset counter) ;URL4="/sec" - 2, 5, 9, 12 - URL4 needs to be used on the 2nd, 5th, 9th, and 12th loop. ;URL5="/env" - 7, 14, 15 - URL5 needs to be used on the 7th, 14th, and 15th loop. ;URL6="/com" - 3, 10 - URL6 needs to be used on the 3rd and 10th loop. Something along those lines, I just don't know how to set up the count and stuff to call in specific stuff. Edited April 24, 2008 by JuggaloZeke Link to comment Share on other sites More sharing options...
herewasplato Posted April 24, 2008 Share Posted April 24, 2008 Here is enough to get you started...#include <IE.au3> $count = 1 $oMMC = _IECreate("about:blank") While 1 Select Case $count = 1 Or $count = 4 Or $count = 8 Or $count = 11 _IENavigate($oMMC, "cnn.com") Case $count = 6 Or $count = 13 _IENavigate($oMMC, "ge.com") Case $count = 2 Or $count = 5 Or $count = 9 Or $count = 12 _IENavigate($oMMC, "3m.com") EndSelect $count = $count + 1 If $count = 17 Then $count = 1 Sleep(500) WEndI think that you can figure out what to copy/paste/change. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
JuggaloZeke Posted April 24, 2008 Author Share Posted April 24, 2008 That sounds like a winner. I was thinking in a completely different way but that looks like it should work. Thanks for the help. Link to comment Share on other sites More sharing options...
herewasplato Posted April 24, 2008 Share Posted April 24, 2008 That sounds like a winner. I was thinking in a completely different way but that looks like it should work. Thanks for the help. You are welcome.I tested it before I posted the code - it works - but know that I don't use the IE functions much so I'm not sure if there is any code that should be added to release "things". Running a loop like that until you stop it might work fine as coded or it may eat up resources over time - I'm not sure. [size="1"][font="Arial"].[u].[/u][/font][/size] 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