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 

Using Alt, Shift etc instead of ! + etc

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



Joined: 05 Oct 2007
Posts: 15

PostPosted: Fri Nov 30, 2007 7:49 am    Post subject: Using Alt, Shift etc instead of ! + etc Reply with quote

Is it possible to use in script the literal versions of ^ , ! , + , and so on.. meaning : Shift, Alt, RAlt ...

If you only need for example one hotkey like Alt ..is it ok ... but if you need to write Alt B for example the script is giving you an error.

I know about the & ...for example you could write Alt & B - but sometimes this doesn't work and you are forced to write !B .
Back to top
View user's profile Send private message
[VxE]



Joined: 07 Oct 2006
Posts: 1226

PostPosted: Fri Nov 30, 2007 9:03 am    Post subject: Reply with quote

to use these characters in a string or send command, you can either "send {raw} !#^+" or escape the characters with a [`] (the key just below the escape key)

if you want to assign those symbols as hotkeys, use
Code:
+1::  ; !
+3::  ; #
+6::  ; ^
+=:: ; +

to learn more about hotkeys, look here
_________________
My Home Thread
More Common Answers: 1. It's in the FAQ 2. Ternary ( ? : ) guide 3. Post code with [code][/code] tags
Back to top
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 2592
Location: Australia, Qld

PostPosted: Fri Nov 30, 2007 2:04 pm    Post subject: Reply with quote

I think sebastian___ means to use readable names (Alt, Shift, etc.) in place of the modifier symbols (!, +, etc.) I'm sorry to say "it's not possible."
Back to top
View user's profile Send private message
sebastian___



Joined: 05 Oct 2007
Posts: 15

PostPosted: Fri Nov 30, 2007 8:39 pm    Post subject: Reply with quote

It's possible only some times. I think.
For example :

h::Shift

or

Ctrl::Alt

But it's a mistery why sometimes works..and sometimes not.
Back to top
View user's profile Send private message
tonne



Joined: 06 Jun 2006
Posts: 1188
Location: Denmark

PostPosted: Fri Nov 30, 2007 9:17 pm    Post subject: Reply with quote

When it works it's called remapping when not hotkey Wink
In other words the abbrevs can only be used in remapping keys and buttons.
_________________
there's a dog barking close within the range of my ear
sounds like he wants to escape the chain
he would probably bite me to death if he could
but the chain lets me spit in his face

- Kashmir
Back to top
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 2592
Location: Australia, Qld

PostPosted: Sat Dec 01, 2007 1:01 am    Post subject: Reply with quote

Nope. In this instance, it's not a modifier key, since it isn't modifying anything. Razz The readable names can only be used when sending or mapping (as a hotkey or remap) the "modifier" key itself. A remapping is implicitly just a pair of hotkeys.
Quote:
When a script is launched, each remapping is translated into a pair of hotkeys. For example, a script containing a::b actually contains the following two hotkeys instead:
Code:
*a::
SetKeyDelay -1   ; If the destination key is a mouse button, SetMouseDelay is used instead.
Send {Blind}{b DownTemp}  ; DownTemp is like Down except that other Send commands in the script won't assume "b" should stay down during their Send.
return

*a up::
SetKeyDelay -1  ; See note below for why press-duration is not specified with either of these SetKeyDelays.
Send {Blind}{b Up}
return
Back to top
View user's profile Send private message
Guest






PostPosted: Sat Dec 01, 2007 7:19 am    Post subject: Reply with quote

Good to know, 2 years later, other people want this...
...let's try to get this in!...
Back to top
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