Sign in to follow this  
Followers 0
zutto

how to repeat from string X to string Y? till i tell it to stop.

4 posts in this topic

#1 ·  Posted (edited)

yeah, topic says it.. as example repeat from string 19 to string 400? and when you click the stop/pause/whateverkey it pauses/stops/ordosomething?

hows that possible?

some short example might be nice..

or what to search from Help file?

func _Start doesnt really work since you have to always click start when it ends :)

regards.

Edited by zutto

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

repeat from string 19 to string 400

What do you mean by this? What are you trying to accomplish?

You want to output the numbers between '19' and '400', counting up? Random?

You just want a loop to do something while between those two numbers?

Something like this?

Dim $i
$x = 19
$y = 400

For $i = $x to $y
    ;Do stuff
Next

The above would loop 381 times (starting at 19, $i increments once each loop, and stops at 400)

Edit: As for the hotkey, search 'HotKeySet' in the help file.

Edited by v3rt1g0

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

What do you mean by this? What are you trying to accomplish?

You want to output the numbers between '19' and '400', counting up? Random?

You just want a loop to do something while between those two numbers?

Something like this?

Dim $i
$x = 19
$y = 400

For $i = $x to $y
    ;Do stuff
Next

The above would loop 381 times (starting at 19, $i increments once each loop, and stops at 400)

Edit: As for the hotkey, search 'HotKeySet' in the help file.

i want it just to repeat from 19 line to 400 till i tell it to stop ;|

EDIT: my script atm build to "repeat" it like this: Run("**.exe") at the end but since i got 1 script at the start and i dont want it always to run it..so i just want it to repeat the second script

example of my script:

firstscript E
xxx
xx
xx
firstscriptend S

second script Z  [[b];this i want to repeat.[/b]
xxx
xxx
xxxx
xx
xxx
xxx
x
Second script end X;[b]until this and start again from the second script[/b] untill i tell it to stop.

[ in short: i want it to repeat from Z to X untill i tell it to stop;P
Edited by zutto

Share this post


Link to post
Share on other sites

i want it just to repeat from 19 line to 400 till i tell it to stop ;|

EDIT: my script atm build to "repeat" it like this: Run("**.exe") at the end but since i got 1 script at the start and i dont want it always to run it..so i just want it to repeat the second script

example of my script:

firstscript E
xxx
xx
xx
firstscriptend S

second script Z  [[b];this i want to repeat.[/b]
xxx
xxx
xxxx
xx
xxx
xxx
x
Second script end X;[b]until this and start again from the second script[/b] untill i tell it to stop.

[ in short: i want it to repeat from Z to X untill i tell it to stop;P
You simply need to use a hotkey to exit the loop. The following example would run a loop until you press the ESC key. Upon pressing ESC, the script exits.

HotKeySet("{ESC}", "Quit")

While 1
   ;Do stuff
WEnd

Func Quit()
    Exit
EndFunc

Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt

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