I need help with Controlsend

Get help with using AutoHotkey and its commands and hotkeys
Bunny_fairfax
Posts: 1
Joined: 24 Nov 2017, 20:03

I need help with Controlsend

24 Nov 2017, 20:18

Hello there! I'm having some troubles with the controlsend in a game

What i'm trying to do is: sending a bunch of {space} in a game while it is minimized/unfocused

Here's the code i came up with

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus





The thing is, no keystroke is sent....
I know my script is trash and all, but idk why it's not working, it worked in other games! anyone to help please? maybe i'm doing something wrong :(
User avatar
jeeswg
Posts: 2934
Joined: 19 Dec 2016, 01:58
Location: UK

Re: I need help with Controlsend

24 Nov 2017, 21:15

Some possibilities:
- Run AHK in admin mode.
-

Code: [Select all] [Download] GeSHi © Codebox Plus

ControlSend, ahk_parent, {Space}, ahk_id %swbpid%

-

Code: [Select all] [Download] GeSHi © Codebox Plus

ControlGetFocus, vCtlClassNN, ahk_id %swbpid%
ControlFocus, % vCtlClassNN, ahk_id %swbpid% ;this probably won't change the active window
ControlSend, % vCtlClassNN, {Space}, ahk_id %swbpid%

Return to “Ask For Help”

Who is online

Users browsing this forum: chngrcn and 75 guests