Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. Thank you for your support. Tom Speirs

Patreon

[RESOLVED] Autohotkey problem (again)


stigt

Recommended Posts

Hey guys, I am again running into problems with my autohotkey scripts. I need to use this script to launch my old Game&Watch LCD simulators from within gameex. I need an ahk script to bypass the starting screen. When I run the ahk script outside of gameex it does what it needs to do, it launches the LCD emulator and skips the startup screen. I checked that the ahk script is still active and running until I close the LCD emulator manually with the ESC key. However when I try to launch the same ahk script from within GameEx, the screen turns blank and returns to the gameex screen.  I would expect that gameex would only take back focus after the program it has started finishes?

My main question is : How do you use an ahk script with Gameex to run a game?

I included my script and the gameex config for my LCD games, hops someone can help me with this..

#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

Run D:\Emulation\Xpadder\Profiles\dk2.xpadderprofile

Run, Dkong.EXE, D:\Emulation\LCD\Donkey Kong

WinWait, About Donkey Kong...
WinActivate, About Donkey Kong...
ControlClick, - PLAY -, About Donkey Kong...

WinWait, Form1
Click 230,150

Process, WaitClose, Dkong.EXE
Run D:\Emulation\Xpadder\Profiles\blank.xpadderprofile
ExitApp
[Emulator_3]
Enabled=True
STARTPAGENAME=Game & Watch
TITLETEXT=Game & Watch
StartPageLogo=lcd2
ROMFilter=*.ahk
RomPath=D:\Emulation\LCD
RomsInFolders=True
SnapPath=D:\Emulation\LCD\Artwork\Screenshot
TitlePath=
BoxPath=D:\Emulation\LCD\Artwork\Box
CartPath=D:\Emulation\LCD\Artwork\Cartridge
ManualPath=D:\Emulation\LCD\Manuals
ControlPanelPath=D:\Emulation\LCD\Controls
InstructionsPath=
WorkingPath=D:\Emulation\LCD
MapKeys=True
WaitBeforeKeys=
SendKeys=
ReplaceDash=True
ReplaceUnder=True
Capitals=False
RemoveBrackets=True
ShowDesktop=True
Debug=False
MAPFile=
AlsoLaunch=
Command=""[ROMPath]\[RomFile]""
LaunchBefore=
LaunchAfter=
configFile=
ExcludedFiles=
CustomBackground=lcd.png
PlayMusic=
DontShowInfo=
PlaySelectionMusic=
SelectionMusicFolder=
PCGame=
DATABASE=
UseDbName=False
GamesIn7Zips=
MergeSets=
PlayInScreenSaver=
ShowMostPlayed=
RandomMostPlayed=
CDCheck=
CDCheckFile=
lastgame=
TVAdPath=
MusicPath=
ImageNotFound=

 

Link to comment
Share on other sites

Can you attach (no copy and paste please) copies of your gameex.ini and log.txt files for review. Not sure if you will get much response of anyone else doing these games this way but someone may be able to assist with the contents of these files.

Link to comment
Share on other sites

Thx for the quick reply Draco, I attached the requested files to this message.

I understand that these LCD games are a niche in the emulation scene (I just have a soft spot for them as I played them a lot as a child...), but I think my question is more about the general usage of an ahk script to launch an emulator from gameex, and that might be useful for other gameex users. For now I cant seem to figure out how to use autohotkey to launch any emulator from within gameex. And I know its possible, these scripts used to work before I took a break from emulation a year or so ago..

log.txt GameEx.ini

Link to comment
Share on other sites

  • 2 weeks later...

OK, sometimes the solution is as dumb as the problem...

I figured out what the cause of the troubles was: it seems that GameEx doesnt like ahk scriptnames with multiple words. When I changed the name from my ahk file from "Donkey Kong II.ahk" to "Donkey_Kong_II.ahk" the script runs as normal and GameEx launches the desired program.

So case closed, this thread can be marked as resolved. This info might be helpful for other users of auto hotkey and GameEx

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...