| View previous topic :: View next topic |
| Author |
Message |
Pause/Interrupt Question Guest
|
Posted: Mon Feb 22, 2010 2:51 am Post subject: Guest2.0 |
|
|
Not quite sure how to put this ....
| Code: | Loop
{
If TestVar
{
Sleep, 500
SendInput, {Blind}{1}
}
} |
Basically, if I pause the script during the Sleep, when I un-pause it, it fires off the 1 even if TestVar is false. Only once, though. What I'm trying to figure out is, how do I make it so that the 1 doesn't get fired off once? |
|
| Back to top |
|
 |
Guest2.0 Guest
|
Posted: Mon Feb 22, 2010 2:52 am Post subject: |
|
|
| Oh damn. I put the username in the wrong input box and the subject/topic too. >.< |
|
| Back to top |
|
 |
a_h_k
Joined: 02 Feb 2008 Posts: 626
|
Posted: Mon Feb 22, 2010 4:27 am Post subject: Re: Guest2.0 |
|
|
There's simpler ways to do it, but i'm assuming you want to keep the same structure, so... | Code: | Loop
{
If TestVar
{
Sleep, 500
If TestVar
SendInput, {Blind}{1}
}
} |
Btw: You can edit the thread name via "Edit" --> "Subject" box |
|
| Back to top |
|
 |
Leef_me
Joined: 08 Apr 2009 Posts: 5336 Location: San Diego, California
|
Posted: Mon Feb 22, 2010 4:39 am Post subject: Re: Guest2.0 |
|
|
| a_h_k wrote: | | Btw: You can edit the thread name via "Edit" --> "Subject" box |
Btw: Only registered users can edit their messages. |
|
| Back to top |
|
 |
Guest2.0 Guest
|
Posted: Mon Feb 22, 2010 7:34 am Post subject: Re: Guest2.0 |
|
|
| a_h_k wrote: | There's simpler ways to do it, but i'm assuming you want to keep the same structure, so... | Code: | Loop
{
If TestVar
{
Sleep, 500
If TestVar
SendInput, {Blind}{1}
}
} |
Btw: You can edit the thread name via "Edit" --> "Subject" box |
Would that affect performance? Performance is a factor and if there's another way with a different structure that doesn't affect performance, I'd rather try that. |
|
| Back to top |
|
 |
Guest2.0 Guest
|
Posted: Mon Feb 22, 2010 8:33 am Post subject: |
|
|
Now that I think about it, I'm not sure that would help. TestVar is ever changing and it would interfere with the original function that is supposed to happen when TestVar evaluates to true. Just to further elaborate; Lets say that the script acknowledges TestVar to be true, then begins sleeping. Normally after the sleep it would send 1, but if TestVar is now evaluating to false after the sleep, it won't.
Unfortunately, I believe that it's a likely scenario. Any other ideas, possibly? Maybe that simpler method you mentioned earlier? Anyhow, I appreciate the help  |
|
| Back to top |
|
 |
a_h_k
Joined: 02 Feb 2008 Posts: 626
|
Posted: Tue Feb 23, 2010 11:58 am Post subject: |
|
|
| What is this for? |
|
| Back to top |
|
 |
|