Game Capture not running with window title

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
elgatohelp
Posts: 11
Joined: 18 Jul 2018, 11:33

Game Capture not running with window title

18 Jul 2018, 11:40

Code: Select all

SendMode Play
SetKeyDelay, 0, 0, Play

F2::ControlSend, ,2, Game Capture HD
;or F2::ControlClick, x185 y555, Game Capture HD
return
I am trying to use this code to make it when I press f2 the game capture changes scenes (it does when you press 2). When the app is opened, it works fine. But I am trying to make it so I don't have to have it on the front of my screen for it to work. Anyone know what to do?
Last edited by elgatohelp on 21 Jul 2018, 20:16, edited 2 times in total.
elgatohelp
Posts: 11
Joined: 18 Jul 2018, 11:33

Re: Game Capture not running with window title

20 Jul 2018, 00:50

Can I please get some help with this??
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Game Capture not running with window title

20 Jul 2018, 02:12

Try to run "the window" in background?
elgatohelp
Posts: 11
Joined: 18 Jul 2018, 11:33

Re: Game Capture not running with window title

20 Jul 2018, 09:03

wolf_II wrote:Try to run "the window" in background?
Yeah, nothing happens when I run the ahk and the app is open in the background.
elgatohelp
Posts: 11
Joined: 18 Jul 2018, 11:33

Re: Game Capture not running with window title

21 Jul 2018, 10:51

Anyone else know what I need to do to fix the problem?
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Game Capture not running with window title

21 Jul 2018, 13:57

i dont think SendMode does anything for ControlSend.
When the a[[ is opened
what does this even mean?
anyway, try SetKeyDelay with different settings. Try sending by targetting the executable instead: ControlSend, ,2, ahk_exe whateveritscalled.exe. Try the ahk_parent option.
elgatohelp
Posts: 11
Joined: 18 Jul 2018, 11:33

Re: Game Capture not running with window title

21 Jul 2018, 20:25

swagfag wrote:
When the a[[ is opened
what does this even mean?
Sorry, I meant app. I had a typo :P.

So, I tried what you said but it still doesn't work.

Code: Select all

SetKeyDelay, 0, 0

F2::ControlSend, ,2, ahk_exe GameCapture.exe
return
swagfag wrote:
anyway, try SetKeyDelay with different settings.
I don't think that will do anything as it already works just it won't work if I don't have the window/app opened/on screen.
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Game Capture not running with window title

22 Jul 2018, 04:01

Try also:

Code: Select all

DetectHiddenWindows, On
F2:: ControlSend,, 2, ahk_exe GameCapture.exe
elgatohelp
Posts: 11
Joined: 18 Jul 2018, 11:33

Re: Game Capture not running with window title

22 Jul 2018, 08:53

wolf_II wrote:Try also:

Code: Select all

DetectHiddenWindows, On
F2:: ControlSend,, 2, ahk_exe GameCapture.exe
For some reason When I do

Code: Select all

DetectHiddenWindows, On
F2:: ControlSend,, 2, ahk_exe GameCapture.exe
It doesn't work at all. Even when the screen is open.
I did

Code: Select all

DetectHiddenWindows, On
F2::ControlSend, ,2, Game Capture HD
But the same thing happened. It only worked when the window was on screen.
elgatohelp
Posts: 11
Joined: 18 Jul 2018, 11:33

Re: Game Capture not running with window title

24 Jul 2018, 08:15

Does anyone know why this is happening and how to fix it?
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Game Capture not running with window title

24 Jul 2018, 13:43

okay lets make some distinctions here.
what im gathering from this, is that ControlSend only sends keystrokes, while the GameCapture window is opened up on the screen, is active and has keyboard/mouse focus. What u want is, presumably, to ControlSend keystrokes to it, while its minimized. Thing is, there is no standard dictating applications should abide by your expectation that they should be able to handle input, while unfocused. They can, but not necessarily. In fact, many games for example specifically do not, so as to limit the use of bots.
If youve tried all these controlsend variants and none of them works, it might be simply due to the application disregarding such inputs, while inactive/unfocused.
Alternatively, u might try to PostMessage something to the app, no guarantees that will work either though. Or try using the microsoft accessibility API(MSAA, see Acc.ahk), but the same thing holds for it as well.
elgatohelp
Posts: 11
Joined: 18 Jul 2018, 11:33

Re: Game Capture not running with window title

24 Jul 2018, 14:10

swagfag wrote:What u want is, presumably, to ControlSend keystrokes to it, while its minimized.
It doesn't have to be minimized. And how I understand what you were saying about how it might not receive keystrokes when minimized/out of focus (Or at least that's what I got out of it). Wouldn't I still be able to when It is in the background and not minimized? Like if I have a window on top of it covering it up it should still register keystrokes.
MannyKSoSo
Posts: 440
Joined: 28 Apr 2018, 21:59

Re: Game Capture not running with window title

24 Jul 2018, 14:20

It all depends on how the key is being sent in terms of timing. Any computer input you do without a program is seen slow in comparison to a computer. So when a program like autohotkey sends a click or a keystroke, its sends it much faster than a person could. So some programs look at how much time a key is being held down. I have heard that most programs look for a key press of at least 50 ms (as this is the fastest average a person could do just pressing a button). So the fact may be that its working to fast for the game to accept it as a valid input.
User avatar
Xtra
Posts: 2744
Joined: 02 Oct 2015, 12:15

Re: Game Capture not running with window title

24 Jul 2018, 14:23

swagfag wrote: Alternatively, u might try to PostMessage something to the app.
+1
elgatohelp
Posts: 11
Joined: 18 Jul 2018, 11:33

Re: Game Capture not running with window title

24 Jul 2018, 16:43

MannyKSoSo wrote:It all depends on how the key is being sent in terms of timing. Any computer input you do without a program is seen slow in comparison to a computer. So when a program like autohotkey sends a click or a keystroke, its sends it much faster than a person could. So some programs look at how much time a key is being held down. I have heard that most programs look for a key press of at least 50 ms (as this is the fastest average a person could do just pressing a button). So the fact may be that its working to fast for the game to accept it as a valid input.
Yeah, but it does work. Just not when the application is minimized or off screen...
elgatohelp
Posts: 11
Joined: 18 Jul 2018, 11:33

Re: Game Capture not running with window title

24 Jul 2018, 16:45

swagfag wrote:u might try to PostMessage something to the app
Can I get an example? I don't know how to use PostMessage.
elgatohelp
Posts: 11
Joined: 18 Jul 2018, 11:33

Re: Game Capture not running with window title

26 Jul 2018, 10:11

I read https://autohotkey.com/docs/commands/PostMessage.htm but I don't understand what to put for wParam and lParam etc...
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Game Capture not running with window title

26 Jul 2018, 13:12

u get your spy tool of your own choosing(Visual Studio's spy++, Winspector, Winspector Spy, Window Detective, API Monitor). You run the correct one, matching your target program's bitness and set up some message filters. You click around/press buttons/issue some commands in your target application and look what messages are captures, if any. The spytool will then tell you what to put in place of wParam.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], sbrady19 and 131 guests