Jump to content

My Touhou .ahk module file


craiganderson

Recommended Posts

Hello. I wanted a module that simply opened and closed the Touhou games. No more or no less. Just like you were clicking on the .exe file outside of hyperspin. So I used the existing one and created this for myself. It works really well so far. Opens and Closes each Touhou game (both .hdi and .exe) without difficulty. Gotta name shortcuts and move a few files around differently than the other setups. I will be glad to elaborate if anybody is interested. Just FYI. No biggie either way.... But if you had any trouble setting up Touhou this might be a nice option to give a try....

MEmu = 
MEmuV =  
MURL = 
MAuthor = craiganderson
MVersion = 1.0
MCRC = 
iCRC = 
mId = 
MSystem = "Touhou"

;----------------------------------------------------------------------------
; Notes:
;----------------------------------------------------------------------------

StartModule()
FadeInStart()

If romExtension = .lnk 
{
executable=%romName%.exe
Run, %romPath%\%romName%%romExtension%
WinWait, A
WinWaitActive, A
}

If romExtension = .hdi 
{
executable=Next.exe
IniWrite, %romPath%\%romName%%romExtension%, %emuPath%\MAIN.INI, DISK, DISK02
IniWrite, 1, %emuPath%\MAIN.INI, Control, AutoRun	; required for games to start on emu launch
Run(executable,emuPath,"Hide")
WinWait("Emulation Window ahk_class T98-Next")
WinWaitActive("Emulation Window ahk_class T98-Next")
Sleep, 1000	; need this otherwise mouse doesn't move off screen
; If romName = 3th - Phantasmagoria of Dim Dream
; Run, remap_keys.exe, %modulePath%
}

MouseMove 0,2000,0  ;Move mouse off screen
FadeInExit()
Process("WaitClose", executable)
7zCleanUp()
FadeOutExit()
ExitModule()
CloseProcess:
FadeOutStart()
Process, Close, th06.exe
Process, Close, th06e.exe

Process, Close, th07.exe
Process, Close, th07e.exe

Process, Close, th075.exe
Process, Close, th075e.exe

Process, Close, th08.exe
Process, Close, th08e.exe

Process, Close, th09.exe
Process, Close, th09e.exe

Process, Close, th095.exe
Process, Close, th095e.exe
Process, Close, th095_ver102a.exe

Process, Close, th10.exe
Process, Close, th10e.exe

Process, Close, th105.exe
Process, Close, th105e.exe

Process, Close, th11.exe
Process, Close, th11e.exe

Process, Close, th12.exe  
Process, Close, th12e.exe  

Process, Close, th123.exe
Process, Close, th123e.exe

Process, Close, th125.exe
Process, Close, th125e.exe

Process, Close, th128.exe
Process, Close, th128e.exe

Process, Close, th13.exe   
Process, Close, th13e.exe 

Process, Close, th135.exe
Process, Close, th135e.exe

Process, Close, th14.exe
Process, Close, th14e.exe

Process, Close, th143.exe
Process, Close, th143e.exe

Process, Close, Next.exe
Process, Close, Banshiryuu.exe
Process, Close, Kioh Gyoku.exe
Process, Close, Shuusou Gyoku.exe
Process, Close, Rain.exe
Return

Link to comment
Share on other sites

Did you somehow run into issues with these games and the current modules? From what I remember, it pretty much just does the same thing you put in your module here anyways...?

yeah..i was getting "waiting for ahk class " type errors on a few games. i couldnt fix and thought i would just make a very simple one to do the job

and some games didnt want to close very well

i trimmed them down to a pretty simple level

i didnt need all the extra stuff that was in the other modules

im not smart enough to figure them out

:)

Link to comment
Share on other sites

I have an updated module that doesn't have that errorbut to use if tbe user will have to hange some other stuff around (different shortcuts and move t98 emulator to did folder etc.))

Now works perfect and ell exit perfectly as well. Exits via task manager type command

Let me know if anybody wants to try it

Link to comment
Share on other sites

  • 7 months later...

craiganderson... found your thread, Im using a T98-Next.ahk and the newer games start and exit ok, but its the first few ones that wont allow me to use my joystick and the esc and altF4 wont exit the game.. it goes into that dos looking interface. Any help appreciated

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...