AutoHotkey Community

It is currently May 26th, 2012, 6:41 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: June 16th, 2009, 6:05 pm 
Offline

Joined: March 25th, 2008, 8:46 pm
Posts: 38
Code:
#IfWinActive, ahk_class TTOTAL_CMD

^m:: run, notepad ;p.e.

^n::
 Hotkey, ^m, off ; desactivar ^m
 ; code
 ; code
 Hotkey, ^m, on  ;activar ^m
 return
   
#IfWinActive

Launch ^n hotkey result in error:
Error: Nonexistent hotkey. The current threak will exit.
at line: Hotkey, ^m, on
Why?
Note: Total Commander windows is active.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 16th, 2009, 6:26 pm 
Offline

Joined: October 7th, 2006, 4:50 pm
Posts: 3157
Location: MN, USA
To avoid that error, remove the very last line in your script: #IfWinActive. For an explanation of why, see Chris's comments in this old thread: Hotkey command #IfWin variant sensitivity.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 16th, 2009, 7:19 pm 
Offline

Joined: March 25th, 2008, 8:46 pm
Posts: 38
Thank's.
And if I need other hotkeys without "#ifwinactive" limitation?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 16th, 2009, 7:28 pm 
Offline

Joined: October 7th, 2006, 4:50 pm
Posts: 3157
Location: MN, USA
See Chris's comments in the link above.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: dra, Google [Bot], rbrtryn and 65 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