 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Zvi
Joined: 22 Aug 2008 Posts: 25
|
Posted: Fri Aug 22, 2008 12:39 pm Post subject: User defined Loop count |
|
|
Is there a way to have a simple loop of any action but with an 'n' times for the loop? Then when the script is run, an input window pops up, asking the user how many times he wants the action to loop?
Thanks |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6264
|
Posted: Fri Aug 22, 2008 12:42 pm Post subject: |
|
|
 _________________
 |
|
| Back to top |
|
 |
poo_noo
Joined: 08 Dec 2006 Posts: 137 Location: Sydney Australia
|
Posted: Fri Aug 22, 2008 12:49 pm Post subject: |
|
|
tested | Code: | InputBox, N, Loops, Please tell me how many loops to do, , ,
Loop, %N%
{
MsgBox, Loops requested is %N%`nLoop number is %A_Index%.
Sleep, 100
}
|
_________________ Paul O |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Aug 22, 2008 12:56 pm Post subject: Re: User defined Loop count |
|
|
| Zvi wrote: | Is there a way to have a simple loop of any action but with an 'n' times for the loop? Then when the script is run, an input window pops up, asking the user how many times he wants the action to loop?
Thanks |
A simple example: | Code: | InputBox, count, Loop Tester, Enter number of loops to do.
loop, %count% {
; put your actions here
tooltip, Loop #: %A_Index%
}
MsgBox, Loop Tester Done |
 |
|
| 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
|