| View previous topic :: View next topic |
| Author |
Message |
ahk_man
Joined: 20 Jun 2004 Posts: 39
|
Posted: Mon Sep 06, 2004 4:23 am Post subject: Urgent Help...need expert help! |
|
|
How can I prevent my code from only running once even though user keeping pushing the same hotkey label? I want the script to run only once even though the users keep pressing it like ten times.
F2::
Send, abc.
On with another subject:
Also, I tried using blockinput, on and blockinput, off to prevent user from sending out unnecessary data, however, sometimes I find users can still send out data when they interact with the mouse or keyboard when the script is running. Is there a stronger way of stopping user from interacting with the script while it's running? I am running a script where if the user interact with the script it might change how the output may comes out. |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Mon Sep 06, 2004 6:39 am Post subject: |
|
|
| Quote: | | I want the script to run only once even though the users keep pressing it like ten times. |
| Code: | F2::
Send, abc.
ExitApp |
I'm not to much into Hotkeys
| Quote: | | On with another subject |
from a support perspective it would make sense to open a separate "TroubleTicket" aka post on each individual issue/request. So they can be solved separately and won't mix up different topics (which could confuse a l'il when a thread gets looooonger)  |
|
| Back to top |
|
 |
Candle
Joined: 19 Aug 2004 Posts: 334
|
Posted: Mon Sep 06, 2004 6:47 am Post subject: |
|
|
| Exit |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Mon Sep 06, 2004 11:18 am Post subject: |
|
|
| Quote: | | I want the script to run only once even though the users keep pressing it like ten times. | The above is a good solution. You could also have the hotkey disable itself:
F2::
Send, abc.
Hotkey, F2, Off
return
| Quote: | | sometimes I find users can still send out data [with BlockInput on] when they interact with the mouse or keyboard when the script is running. | As far as I know, the only way for the user to disable or bypass BlockInput is by pressing Ctrl-Alt-Del or doing something that causes the script to close. If you find exceptions to this, I'll document them (probably can't fix them since BlockInput is a feature built into the OS).
| Quote: | | Is there a stronger way of stopping user from interacting with the script while it's running? | You could display a Splash window to tell the user not to press anything or move the mouse:
SplashTextOn, 200, 200, Operation in Progress, Please do not type anything or move the mouse.
If you want to get fancier, you could display a progress bar to give the user feedback about how much of the task remains. |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Mon Sep 06, 2004 11:27 am Post subject: |
|
|
| Quote: | | You could display a Splash window |
... covering the maximum screen scale eg. 1024x768 saying "keep your beautifull hands away from the mouse & keyboard otherwise some high voltage peaks will be send to your tiny CPU"  |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Mon Sep 06, 2004 11:59 am Post subject: |
|
|
That's even nicer, though it might annoy some users  |
|
| Back to top |
|
 |
|