AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Urgent Help...need expert help!

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
ahk_man



Joined: 20 Jun 2004
Posts: 39

PostPosted: Mon Sep 06, 2004 4:23 am    Post subject: Urgent Help...need expert help! Reply with quote

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
View user's profile Send private message
BoBo
Guest





PostPosted: Mon Sep 06, 2004 6:39 am    Post subject: Reply with quote

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 Embarassed

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) Wink
Back to top
Candle



Joined: 19 Aug 2004
Posts: 334

PostPosted: Mon Sep 06, 2004 6:47 am    Post subject: Reply with quote

Exit
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Mon Sep 06, 2004 11:18 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
BoBo
Guest





PostPosted: Mon Sep 06, 2004 11:27 am    Post subject: Reply with quote

Quote:
You could display a Splash window

... covering the maximum screen scale eg. 1024x768 Laughing saying "keep your beautifull hands away from the mouse & keyboard otherwise some high voltage peaks will be send to your tiny CPU" Twisted Evil
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Mon Sep 06, 2004 11:59 am    Post subject: Reply with quote

That's even nicer, though it might annoy some users Smile
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group