problem with keys and prefixes

Get help with using AutoHotkey and its commands and hotkeys
gluwak
Posts: 4
Joined: 30 Jun 2016, 03:38

problem with keys and prefixes

30 Jun 2016, 05:02

I have this code :

Code: Select all

o::
send -{backspace}LLL
l::
send -{backspace}|)
when i press O key program activate L key .What i should add or change to program work only with real key pressing( not virtual)?Should i use any prefixes or something else? HELP , PLEASE! if you added example , i would be very pleased :)
P.S. Sorry for my bad english , hope you understood me XD
User avatar
lifeweaver
Posts: 144
Joined: 10 May 2014, 05:57
GitHub: lifeweaver
Location: OH

Re: problem with keys and prefixes

30 Jun 2016, 06:37

Hi gluwak,

You need to put a return after the hotkey, i.e.:

Code: Select all

o::
  send -{backspace}LLL
retun

l::
  send -{backspace}|)
return
gluwak
Posts: 4
Joined: 30 Jun 2016, 03:38

Re: problem with keys and prefixes

01 Jul 2016, 01:42

Guys it works!!! BUT!!!!!!!!!!!!!!!! it doesn't work if i use this code

Code: Select all

x::
	send -{backspace}'-|
return
'::
	send -{backspace}€
return
so if i press X this program sends me -|€ but i need to promram send me '-|
neomulemi6
Posts: 216
Joined: 30 Jun 2016, 06:01

Re: problem with keys and prefixes

01 Jul 2016, 03:09

Add ~ before the `::, like this:

Code: Select all

x::
send -{backspace}'-|
return
~'::
send -{backspace}€
return
lexikos
Posts: 6367
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: problem with keys and prefixes

01 Jul 2016, 06:03

If you add ~, the hotkey will no longer block ', so pressing ' will produce '€ instead of .

If you just want to prevent Send from triggering the hotkey, use the $ prefix.

Return to “Ask For Help”

Who is online

Users browsing this forum: tarbear123, toralf and 203 guests