voidale Posted February 2, 2010 Share Posted February 2, 2010 Hey guys, I'm trying to create a loop for my script to run the script 31 times after it ran 31 i want it to change the description in my app so for example the script ran 31 times now the "change the description" command will run, and change it and then start another 31 loops and again "change the description" command will run. any ideas how can i do that? I'm really bad with Do, while commands ;z Thanks for the help! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 2, 2010 Moderators Share Posted February 2, 2010 voidale, I'm really bad with Do, while commandsAre you any better with For...Next? While 1 ; Change description code For $i = 1 To 31 ; Whatever you do 31 times code Next WEnd M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Developers Jos Posted February 2, 2010 Developers Share Posted February 2, 2010 (edited) Shouldn't that be as simple as?: While 1 For $x = 1 to 31 ; do your thing Next ; Do your after 31 thing Wend EDIT: Melba23 is a scary person ... Edited February 2, 2010 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
voidale Posted February 2, 2010 Author Share Posted February 2, 2010 (edited) voidale, Are you any better with For...Next? While 1 ; Change description code For $i = 1 To 31 ; Whatever you do 31 times code Next WEnd M23 Shouldn't that be as simple as?: While 1 For $x = 1 to 31 ; do your thing Next ; Do your after 31 thing Wend EDIT: Melba23 is a scary person ... Thanks guys works great, by the way can use this command twice? i mean that after 5 x 31 times close the script? Edited February 2, 2010 by voidale Link to comment Share on other sites More sharing options...
Developers Jos Posted February 2, 2010 Developers Share Posted February 2, 2010 Thanks guys works great, by the way can use this command twice? i mean that after 5 x 31 times close the script?What about trying in stead of asking? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
voidale Posted February 2, 2010 Author Share Posted February 2, 2010 (edited) What about trying in stead of asking? well i'm trying but this is what i get i wanted it to execute 1-31 loops and then only execute command but it seems to execute command every loopmy script has lots of next maybe this cause this?i tried the script with msgbox worked fine but with my script execute every loopedit: it was the $i i had so many over the script ;p Edited February 2, 2010 by voidale Link to comment Share on other sites More sharing options...
voidale Posted February 2, 2010 Author Share Posted February 2, 2010 (edited) What about trying in stead of asking? just wanted a quick reply i was with my iphone just got home i will test it now won't work is there a other command like if or something i want to loop 250 times the script with the 31 loopso after the 31 loop run for 250 times i want the script to Exithow can i do that? Edited February 3, 2010 by voidale Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 3, 2010 Moderators Share Posted February 3, 2010 voidale, Just add another loop around the outside: For $j = 1 To 250 ; Do NOT use another $i here - you already found out why!!!!! ; Change description code which will run every 31 times For $i = 1 To 31 ; Whatever you do 31 times code Next ; And go and do the whole thing over again 250 times Next (A very unscary!) M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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