AutoHotkey Community

It is currently May 27th, 2012, 5:02 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: October 12th, 2005, 10:11 pm 
Offline

Joined: September 7th, 2004, 9:20 pm
Posts: 275
Location: France
I know I ask for too much, but...
Is it possible to have a derivative fuctionnality of the last improvement, to allow mouse and keyboard remapping for specific applications ?

Suggested syntax :
a::b[, [!]AppName]

what is between the square brackets (so [, [!]AppName]) is optionnal
and ! is optionnal too and means "not"
", AppName" to specify the concerned app

so for example :

a::b, Notepad would replace a by b only in notepad and
a::b, !Notepad would replace a by b in all applications except Notepad
I think it would be a very good improvement.

Edit : Oh !!! And let us be insane!!!

Why not hotkeys and hotstrings specifics to certain apps ?

Thanks
Edit : a lot !!!! :D :D :D


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2005, 3:25 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Context senstive hotkeys and hotstrings have been on the to-do list a long time so should happen someday. Thanks for the syntax ideas. Edit: Easier context-sensitivity is now available via #IfWinActive/Exist.

In the meantime, you can already do context sensitive remappings as shown in the following working example. It puts the remapping in effect only within Notepad:
Code:
SetTimer, WatchActiveWindow, 100
return

a::b

WatchActiveWindow:
IfWinActive ahk_class Notepad
{
   Hotkey, *a, On
   Hotkey, *a up, On
}
else
{
   Hotkey, *a, Off
   Hotkey, *a up, Off
}
return


Last edited by Chris on January 22nd, 2006, 4:21 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2005, 5:19 pm 
Offline

Joined: September 7th, 2004, 9:20 pm
Posts: 275
Location: France
Chris wrote:
Context senstive hotkeys and hotstrings have been on the to-do list a long time so should happen someday. Thanks for the syntax ideas.


Thanks to take my proposition in account.

I already use an application dependant remapping code :
Code:
NumpadDot::
IfWinActive, %FEN_WD%
   Send, `.
else
   Send, `,
return


But it would be nice if inbuilt in AHK. But I think that, as it can be done by an other way, it isn't an emergency...
Thanks for your interesting code.


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: Yahoo [Bot] and 2 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