Jump to content
LaunchBox Community Forums

Using scripts with pc games?


NagakiriHidechi

Recommended Posts

I’m unsure of how ahk scripts work in game that aren’t emulators. 

When the game starts, I need to press F11 after a 15 second wait.

 

When I press escape, I need to close:

Bluestacks.exe

Bluestacks.exe (not a typo, there’s two processes listed in task manager for whatever reason)

HD-agent.exe

HD-player.exe

BstkSVC.exe

From my understanding I would create a batch script that looks something like this, but how do I correctly launch it? Setting up an additional application isn’t doing anything.

 

Sleep, 15000

Send {F11}

Return

$Esc::

{

    Process, Close, {{{Bluestacks.exe}}}
    Process, Close, {{{Bluestacks.exe}}}
    Process, Close, {{{HD-agent.exe}}}
    Process, Close, {{{HD-player.exe}}}
    Process, Close, {{{BstkSVC.exe}}}
}

 

Edited by NagakiriHidechi
Link to comment
Share on other sites

How are you starting these games and the other programs?  Did you create an 'emulator' that loads all these plus the game?  Or do you launch them directly (with no attached emulator) like with a batch file (not to be confused with a 'script' like you show above ;) )?

If it's the latter (no emulator) which is what it sounds like, [one method is] you'd need to compile the above AutoHotkey script (convert it to an exe file) then attach it to the game as an Additional Application and set it to "Automatically Run Before Main Application".

The "Return" is not necessary, but you will need to add ExitApp at the end to exit the script.

Sleep, 15000
Send {F11}

$Esc::
{
   WinClose, ahk_exe Bluestacks.exe
   WinClose, ahk_exe Bluestacks.exe
   WinClose, ahk_exe HD-agent.exe
   WinClose, ahk_exe HD-player.exe
   WinClose, ahk_exe BstkSVC.exe
   ExitApp
}

Also "WinClose" is a lot 'nicer' way to shut down a program.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...