How: Mutiple Hotkeys Ignore Input

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
BuntyJs
Posts: 4
Joined: 19 Dec 2017, 15:25

How: Mutiple Hotkeys Ignore Input

16 Jan 2018, 22:34

Simple Example below:

Code: Select all

A::
{
	E
	sleep, % ran(350, 450)
	B
	sleep, % ran(350, 450)
	F
	sleep, % ran(350, 450)
	D
	sleep, % ran(350, 450)
	E
return
}
Then I have the E/B/F/D/E keys assigned different small scripts, it works great but the game chat still registers that I typed EBFDE after hitting my A Hotkey. I want my script to activate those hotkeys in that order without sending the text inputs to my game chat.

Like he opposite of the $ function.
gregster
Posts: 9012
Joined: 30 Sep 2013, 06:48

Re: How: Mutiple Hotkeys Ignore Input

17 Jan 2018, 01:08

BuntyJs wrote:it works great
Really? That would really surprise me. I think your script has syntax errors.

But if I understand your goal correctly, you might be looking for gosub or functions, or possibly run. No need to send keys to trigger actions. Example:

Code: Select all

a::
	gosub dosomething
	sleep 400 			
	Somefunction()
	;sleep, 400
	;run someother.ahk
return

e::					; optional, if you want to be able to trigger the msgbox also by pushing a key. 
dosomething:
	msgbox something
return

Somefunction(){
	msgbox function
}
BuntyJs
Posts: 4
Joined: 19 Dec 2017, 15:25

Re: How: Mutiple Hotkeys Ignore Input

17 Jan 2018, 15:05

Ooppps. I got it. -facepalm-

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, Google [Bot], mikeyww and 416 guests