Sign in to follow this  
Followers 0
voidale

Loop 31 times for a script

8 posts in this topic

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!

Share this post


Link to post
Share on other sites



voidale,

I'm really bad with Do, while commands

Are you any better with For...Next? :D

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (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: :D Melba23 is a scary person ...

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

voidale,

Are you any better with For...Next? :huggles:

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: :D 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 by voidale

Share this post


Link to post
Share on other sites

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? :D

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

What about trying in stead of asking? :D

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 loop

my script has lots of next maybe this cause this?

i tried the script with msgbox worked fine but with my script execute every loop

edit: it was the $i i had so many over the script ;p

Edited by voidale

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

What about trying in stead of asking? :D

just wanted a quick reply i was with my iphone just got home i will test it now :huggles:

won't work is there a other command like if or something

i want to loop 250 times the script with the 31 loop

so after the 31 loop run for 250 times i want the script to Exit

how can i do that?

Edited by voidale

Share this post


Link to post
Share on other sites

voidale,

Just add another loop around the outside: :D

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0