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 

Insert a literal "+"

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



Joined: 15 Oct 2008
Posts: 2

PostPosted: Wed Oct 15, 2008 12:33 am    Post subject: Insert a literal "+" Reply with quote

I want to insert a string with a literal "+" character. AHK, of course thinks "+" means SHIFT. I have found instructions for escaping other characters, but not for escaping "+".

So if I have:

:oc::chars:hello +1

I get:

hello !

But I want:

hello +1

Surely the answer is somewhere in the forum, but I can't find it.

Thanks in advance for your assistance.
Back to top
View user's profile Send private message
Fry



Joined: 01 Nov 2007
Posts: 885

PostPosted: Wed Oct 15, 2008 12:49 am    Post subject: Reply with quote

`+

Very Happy
Back to top
View user's profile Send private message
pokercurious



Joined: 16 Dec 2007
Posts: 48

PostPosted: Wed Oct 15, 2008 12:53 am    Post subject: Reply with quote

more long-winded than fry's example:

Code:
::oc::
SendInput {raw}chars:hello +1
return


http://www.autohotkey.com/docs/Hotstrings.htm
http://www.autohotkey.com/docs/commands/Send.htm
Back to top
View user's profile Send private message
xyzzy



Joined: 15 Oct 2008
Posts: 2

PostPosted: Wed Oct 15, 2008 1:02 am    Post subject: Reply with quote

Fry, your suggestion did not work. The ` doesn't seem to work before +.

pokercurious, a variation on your idea did work:

:oc::chars:hello {raw}+1

gives

hello +1

THANK YOU!
Back to top
View user's profile Send private message
Krogdor



Joined: 18 Apr 2008
Posts: 1390
Location: The Interwebs

PostPosted: Wed Oct 15, 2008 3:06 am    Post subject: Reply with quote

You can also...
Code:
Send, {+}
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
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