 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
jason786
Joined: 10 Oct 2009 Posts: 6
|
Posted: Sat Oct 10, 2009 9:22 pm Post subject: Help me with understanding loops please! |
|
|
Hello, I made a really simple script for myself but want it to repeat it as many times until I press a button to stop it.
How would I make it loop for ever, and how would I add a stop button
I'm sorry if the answer is obvious, I don't get this stuff yet |
|
| Back to top |
|
 |
Wandery Guest
|
Posted: Sat Oct 10, 2009 9:44 pm Post subject: Re: Help me with understanding loops please! |
|
|
| jason786 wrote: | Hello, I made a really simple script for myself but want it to repeat it as many times until I press a button to stop it.
How would I make it loop for ever, and how would I add a stop button
I'm sorry if the answer is obvious, I don't get this stuff yet |
This isn't a 'proper' way to do it, but it'd work for what you need I imagine
| Code: | N = 1
B = 0
Loop, 10 ; makes it loop ten times, leaving it absolutely blank would make it loop forever
{
Msgbox, This is msg number %N%
N++
If B = 1
Break
}
Msgbox, It's Done
Return
B::
B = 1
Return |
|
|
| Back to top |
|
 |
jason786
Joined: 10 Oct 2009 Posts: 6
|
Posted: Sat Oct 10, 2009 9:50 pm Post subject: Re: Help me with understanding loops please! |
|
|
| Wandery wrote: | | jason786 wrote: | Hello, I made a really simple script for myself but want it to repeat it as many times until I press a button to stop it.
How would I make it loop for ever, and how would I add a stop button
I'm sorry if the answer is obvious, I don't get this stuff yet |
This isn't a 'proper' way to do it, but it'd work for what you need I imagine
| Code: | N = 1
B = 0
Loop, 10 ; makes it loop ten times, leaving it absolutely blank would make it loop forever
{
Msgbox, This is msg number %N%
N++
If B = 1
Break
}
Msgbox, It's Done
Return
B::
B = 1
Return |
|
thank you very much  |
|
| Back to top |
|
 |
Leef_me
Joined: 08 Apr 2009 Posts: 5336 Location: San Diego, California
|
|
| Back to top |
|
 |
jason786
Joined: 10 Oct 2009 Posts: 6
|
Posted: Sat Oct 10, 2009 9:53 pm Post subject: Re: Help me with understanding loops please! |
|
|
thank you for this  |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|