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 

legible form of A_ThisHotKey

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
Laszlo



Joined: 14 Feb 2005
Posts: 4078
Location: Pittsburgh

PostPosted: Mon Mar 07, 2005 7:07 pm    Post subject: legible form of A_ThisHotKey Reply with quote

If a HotKey has function only in certain windows or under other special circumstances, you may want to give the user an error message in a MsgBox, like

"Ctrl-Alt-z HotKey is only supported in text windows"

In this situations you often need a legible form of A_ThisHotKey. A single command could replace the ugly and incomplete:
Code:
StringReplace HKey, A_ThisHotKey, `^, Ctrl-
StringReplace HKey, HKey, `!, Alt-
StringReplace HKey, Hkey, `+, Shift-
StringReplace HKey, Hkey, `#, Win-
StringReplace HKey, Hkey, `<, Left-
StringReplace HKey, Hkey, `>, Right-
StringReplace HKey, Hkey, `*, Any-
StringReplace HKey, Hkey, `UP
StringReplace HKey, Hkey, `~,
StringReplace HKey, Hkey, `$,
StringReplace HKey, Hkey, %A_Space%`&%A_Space%, `+
Does anyone think it was an often needed feature?
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Tue Mar 08, 2005 12:47 am    Post subject: Reply with quote

It seems like it would be too rarely used to justify another built-in variable. However, when function calling finally gets added, it will be easier to have a #include'd function to do this.
Back to top
View user's profile Send private message Send e-mail
Laszlo



Joined: 14 Feb 2005
Posts: 4078
Location: Pittsburgh

PostPosted: Tue Mar 08, 2005 5:26 pm    Post subject: Reply with quote

I was thinking about another subcommand of transform, not a new system variable. With Rajat's scriplets tool or with #include the above code (after fixing it) is not too hard to be included in any script it needs. The reason behind my wish: since AHK is so fast evolving, the list of modifiers might change, and so we need to update our scripts manually. With the transform solution Chris will do it for us.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Wed Mar 09, 2005 2:48 am    Post subject: Reply with quote

I don't think any new modifier symbols will be added because I've learned that doing so is likely to break existing scripts that rely on the modifiers being available as hotkeys. For example, on some keyboard layouts, the caret/circumflex symbol (^) might be an unshifted key that should be permitted as a hotkey, but since it's a modifier, you can't do it directly. Instead, you have to use the SCnnn method as a workaround.

It's true that the "up" suffix did sneak in there, but that will probably be the last one for a while.

Anyway, thanks for the idea, even though for now I think it should be deferred until/unless others say it's something they would want.
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 -> Wish List 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