hotkey does command but doesn't do Key Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
lolzbroz6
Posts: 35
Joined: 08 Sep 2018, 17:18

hotkey does command but doesn't do Key

17 Oct 2018, 11:56

I made a simple hotkey script but I ran into the problem that when I hit E (my hotkey) it does the command but doesn't register as an E on my keyboard, for example when I hit E to copy the selected text it works but if I need to type into google and search something if I hit E it will do the script and it won't type the E in whatever I'm searching!
How can I fix this without changing my hotkey to a different one

Code: Select all

#warn
#SingleInstance Force
a::
msgbox test
Thanks For Any And All Help!!
User avatar
TheDewd
Posts: 1513
Joined: 19 Dec 2013, 11:16
Location: USA

Re: hotkey does command but doesn't do Key

17 Oct 2018, 12:33

Maybe my solution to another post will help you... Created a toggle Hotkey to enable/disable the hotkeys temporarily.

https://autohotkey.com/boards/viewtopic ... 19#p244311
lolzbroz6
Posts: 35
Joined: 08 Sep 2018, 17:18

Re: hotkey does command but doesn't do Key

17 Oct 2018, 12:43

TheDewd wrote:
17 Oct 2018, 12:33
Maybe my solution to another post will help you... Created a toggle Hotkey to enable/disable the hotkeys temporarily.

https://autohotkey.com/boards/viewtopic ... 19#p244311

Thanks! I modified the script a little bit but you gave me the right idea!!
The code is now:

Code: Select all

#NoEnv
#Warn
SendMode Input
SetWorkingDir %A_ScriptDir%
#SingleInstance Force

toggle = 1
#if toggle = 1
a::
msgbox test
toggle = !toggle
SendRaw a
toggle = 1
Thanks For Any And All Help!!
User avatar
TheDewd
Posts: 1513
Joined: 19 Dec 2013, 11:16
Location: USA

Re: hotkey does command but doesn't do Key  Topic is solved

17 Oct 2018, 12:54

You can also try this:

Code: Select all

~a::
	MsgBox, Test
return
The ` tilde character will allow the hotkey to perform its original function in addition to the code you provide.

That means it will execute the MessageBox code, and also send the letter "a".

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: DataLife, Google [Bot], pgeugene, Rohwedder and 39 guests