AutoHotkey Community

It is currently May 27th, 2012, 12:42 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: September 7th, 2005, 3:27 pm 
Offline

Joined: May 13th, 2005, 7:43 pm
Posts: 188
Location: The Desert Southwest
Hello Folks!

Don't know whether this is a characteristic or a bug...

OK.

Let's assume that you have two .ahk scripts running; one has issued the BlockInput, on command and is now idling.

The second one has a couple of function keys assigned hotkey duties, like this:

Code:
$F7::    
   {
   RegWrite, REG_SZ, HKEY_LOCAL_MACHINE, SOFTWARE\mykey1, doSomething, 1
   Sleep, 500 ;keep the reg posting up for a half second
   RegWrite, REG_SZ, HKEY_LOCAL_MACHINE, SOFTWARE\mykey1, doSomething, 0
   }
return

$F9::
   {
   RegWrite, REG_SZ, HKEY_LOCAL_MACHINE, SOFTWARE\mykey, doSomething, 1    
   Sleep, 500 ;keep the reg posting up for a half second
   RegWrite, REG_SZ, HKEY_LOCAL_MACHINE, SOFTWARE\mykey, doSomething, 0
   }
return

Now, if one presses F7 or F9 in the above example, the hotkeys will respond; and the registry will be written :shock:

I know this from the fact that the dependent process which reads these values in the registry will execute the corresponding tasks on cue.

Thanks for the help!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 7th, 2005, 3:38 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I think its because hook hotkeys (those that use the $ prefix or #UseHook) are detected at a lower level than BlockInput. If it's a problem, I think you can work around it by removing the $ prefix so that they become normal hotkeys.

To clarify this, I've added the following to the help file:
Quote:
Certain types of hook hotkeys can still be triggered when BlockInput is on. Examples include "MButton" (mouse hook) and "LWin & Space" (keyboard hook with explicit prefix rather than modifiers "$#").


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 7th, 2005, 4:09 pm 
Offline

Joined: May 13th, 2005, 7:43 pm
Posts: 188
Location: The Desert Southwest
Thanks again, Chris :D

I've been working with .ahk for a few months now, and have found it to be exceptionally well-made overall.

This is yet another useful feature which I'll probably refer to in the future.

Have a great day!


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 32 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group