Defaulting key when not in a game Topic is solved

Ask gaming related questions (AHK v1.1 and older)
ry3ks3u_m4dd0ns
Posts: 18
Joined: 29 Mar 2017, 09:23

Defaulting key when not in a game

11 Aug 2017, 06:28

I want to be annoying in a certain game.

And I want to bind every key in my keyboard (except one for emergency purposes) to spam the same message to the game's chat.

But this means I'll have to create a function for each and every key with only one minor difference: If I'm not in the game, it won't trigger, and instead the default function of said key will happen, whether it be a normal character, or a Delete key, or the Windows Key.

Is there a way for this to be possible?

Here's my code:

Code: Select all

Coffee() {
	if gameStat {
		Send, {Enter}
		Sleep, 50
		Send, {raw}SHAMALAMA DING DONG
		Sleep, 50
		Send, {Enter}
		Return
	} else {
		//I have no idea what to insert here
		Return
	}
neomulemi6
Posts: 216
Joined: 30 Jun 2016, 06:01

Re: Defaulting key when not in a game  Topic is solved

11 Aug 2017, 16:13

Couple things:
1. #IfWinActive
2. You don't even need the "else" section. You can remove it completely.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 84 guests