Send keypress to Launchbox

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
sozuke
Posts: 4
Joined: 20 Jun 2021, 03:41

Send keypress to Launchbox

21 Jun 2021, 13:37

Hello guys!

I'm using a program called BigBox (a mode of Launchbox similar to Steam's Big Picture mode, though it comes as a separate .exe.

I use BigBox to launch different programs, including VLC. When launching VLC I use an AHK-script to make the screen black for a few seconds (I use the Gui, show command to make a solid black window that's set to always on top, and Gui, destroy a few seconds later, when VLC has loaded). I do this so as to not see the brief flash of the VLC interface before it goes to full screen.

I would like to send a keypress to BixBox while the black gui is up in front of it. I thought this would be possible with ControlSend, but I can't get it to work. BigBox's window has a class name that's complicated and changes each time (HwndWrapper[BigBox;;5a5612ea...]). The window name, however, is simple and stays the same (LauncgBox Big Box). I thought it would be possible to use this name with ControlSend:

Code: Select all

ControlSend, "LaunchBox Big Box", {Esc} down
Sleep 100
ControlSend, "LaunchBox Big Box", {Esc} up
Nothing happens though. I'm sure there's something I've gotten wrong here, since I'm new to AHK... anyone mind telling me?

Thanks in advance!
gregster
Posts: 8999
Joined: 30 Sep 2013, 06:48

Re: Send keypress to Launchbox

21 Jun 2021, 14:21

The wintitle should be in the third parameter, without quotes - the key syntax is also not correct:

Code: Select all

ControlSend, , {Esc down}, LaunchBox Big Box
Last edited by gregster on 21 Jun 2021, 14:24, edited 1 time in total.
Reason: key syntax fix
sozuke
Posts: 4
Joined: 20 Jun 2021, 03:41

Re: Send keypress to Launchbox

23 Jun 2021, 13:20

Thanks, I was way off it seems! Works like a charm now.

I'd also like to do the same with Retroarch; here, however, the window title changes depending on the core, but the ahk_class (ahk_class Retroarch) stays the same.

Is it possible to use this with controlsend in the same way as a window title? Tried it as the control and as the title, but no luck so far...
gregster
Posts: 8999
Joined: 30 Sep 2013, 06:48

Re: Send keypress to Launchbox

23 Jun 2021, 14:35

Yes, it also belongs in the wintitle parameter...

Code: Select all

ControlSend, , {Esc down}, ahk_class Retroarch
but that doesn't mean that the program will necessarily work with ControlSend.

You could also try

Code: Select all

ControlSend, ahk_parent, {Esc down}, ahk_class Retroarch
or perhaps the program runs with elevated rights (then run your script as admin).

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: prototype_zero and 261 guests