Jump to content
  • Announcement

    The HyperSpin 2 early access beta is here!

    We’re starting the first public testing phase with Platinum Members to keep the scope manageable while we test the current feature set and begin to add more. In the future, we’ll provide a version for basic members as well.  On behalf of the entire HyperSpin team, we look forward to another exciting adventure with our community.

Autohotkey Script Problem


pjbridger

Recommended Posts

Posted

Hi Guys,
 
I have modified the Super Mario Bros x Script to launch all the Pc games with the pesky launcher windows,
 
However i am encountering an issue,
 
The script works fine, But only if the Game has already been opened once that session,
 
if you go to launch the game for the first time that day it will hang on the launcher window,
 
Any ideas of why this might be?
 
here is the Script,

 

 

 

mTest = true
 
; Author: djvj
; Purpose: Handle launcher windows for PC Games. These windows pop up before the game and usually require some type of input or button you have to press to start the game.
; Notes: Super Mario Bros X does not respond to removing of the title bar or border with WinSet. It is suggested to leave KeepAspect set to false because the window will have these elements hidden.
;----------------------------------------------------------------------------------------------------
; Launcher Settings:
; this should be the window information from the launcher window where we need to intervene before the game launches
LauncherWindow = ahk_class #32770
; this should be the window information from the game itself so we know when to continue the script
GameWindow = ahk_class #32770
; Set to true if you want the script to make the game as big as possible
Fullscreen = true
; Set to true if you want the script to keep the aspect ratio of the game.
KeepAspect = false
; Set to true if you want the script to move the mouse off screen on launch to avoid the cursor from being seen.
MoveMouse = true
;----------------------------------------------------------------------------------------------------
 
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
SetBatchLines, -1 ; script will run as fast as possible
 
WinWait, %LauncherWindow%,,1 ; waiting 10 seconds for the launcher window to show
If !ErrorLevel
{ WinSet, Transparent, %LauncherWindow%
WinActivate, %LauncherWindow%
ControlClick, Button2, %LauncherWindow%

 

 

Any help would be greatly appreciated,

 

thanks,

Posted

Sorry, I don't know the answer to your question, but want to ask you one.

I'm not using any special AHK script like that to launch PC games. Just the normal FadeTitle and other settings in HyperlaunchHQ.

Is this script used only if you aren't using HyperlaunchHQ?

Posted

Thanks for the reply,

 

No,

 

This script is not needed to launch all PC games,

 

But there are some games which require you to press the "Play" button on a loading window before they will run,

 

This script is supposed to press that button for you,

 

does that explain it?

Posted

If you already updated the window class for the game that you are using, I assume that the winwait line is timing out before the game launches.

Try to increase the timeout to something like 10 seconds, as it is too low right now (only one second on the script posted).

This would explain the behavior as the game on a second launch could be fast enough to have the window created before getting to this line because some of their assets are probably already loaded in memory.

Posted

Hi Guys,

 

I have modified the Super Mario Bros x Script to launch all the Pc games with the pesky launcher windows,

 

However i am encountering an issue,

 

The script works fine, But only if the Game has already been opened once that session,

 

if you go to launch the game for the first time that day it will hang on the launcher window,

 

Any ideas of why this might be?

 

here is the Script,

 

 

 

Any help would be greatly appreciated,

 

thanks,

Where did you get this script? I need to get the full version if you have a link.

Posted

I think djvj created it and put it on the git

Man that's sick! I love what you made here and would love to add it to my set up! Don't forget to upload it to the download page! (Tapatalk signature)

Posted

I think djvj created it and put it on the git

Man that's sick! I love what you made here and would love to add it to my set up! Don't forget to upload it to the download page! (Tapatalk signature)

Well it sounds like the one you need to fix your pop-up box in MegaMan

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...