Message
par BlackGhost » 30 mai 2014 - 13:43
Voici mon module
;----------------------------------------------------------------------------
; Atari Jaguar
; Project Tempest v0.95
; by djvj
; 1.1
;
; Notes:
; Set Fullscreen mode below
; Set SelectGameMode if you have any problems with the emu opening the game
; Emu stores joypad config in registry (64-bit OS) @ HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Project Tempest
;----------------------------------------------------------------------------
Fullscreen = true
HideLoading = true ; This speeds up loading roms but can cause some PCs to get stuck at the Open Rom window. Disable it if you have this issue
SelectGameMode = 1 ; 1 = Uses a loop to detect the Edit Box has the romname and path in it. This doesn't work on all PCs, so if you get stuck at the open rom window, use mode 2.
; 2 = Uses a simple Ctrl+v to paste the romname and path, then press Enter to load the game.
;----------------------------------------------------------------------------
SetControlDelay, 40 ; raise this if the module is getting stuck using SelectGameMode 1
SetKeyDelay, -1 ; raise this if the module is getting stuck using SelectGameMode 2
GUI_ID := FadeInStart()
7z1 := 7z(romPath, romName, romExtension, 7zExtractDir)
SetWinDelay, 10
Run, "H:\hyperspin\Pantallas de Espera\Atari Jaguar\hypersplash.exe"
Run, %executable%, %emuPath%
WinWait, Project Tempest ahk_class PT
WinWaitActive, Project Tempest ahk_class PT
WinMenuSelectItem, Project Tempest ahk_class PT,, File, Open ROM
;This fully ensures dialogs are completely hidden even faster than winwait
If ( HideLoading = "true" )
SetTimer, WaitForDialog, 2
WinWaitActive, Open ROM File ahk_class #32770
;Sleep just to ensure controls are accessible
Sleep,1000
If ( SelectGameMode = 1 ) {
Loop {
ControlGetText, edit1Text, Edit1, Open ROM File ahk_class #32770
; ControlGet, Txt, Line, 1, Edit1, Open ROM File ahk_class #32770
If ( edit1Text = romPath . romName . romExtension )
Break
Sleep, 100
ControlSetText, Edit1, %romPath%%romName%%romExtension%, Open ahk_class #32770
; WinActivate, Open ROM File ahk_class #32770
}
ControlSend, Button2, {Enter}, Open ahk_class #32770 ; Select Open
} Else If ( SelectGameMode = 2 ) {
Clipboard := romPath . romName . romExtension
Send, ^v{Enter}
} Else
ScriptError("You did not choose a valid SelectGameMode.`nOpen the module and set the mode at the top.")
Sleep, 1000
If ( HideLoading = "true" )
SetTimer, WaitForDialog, Off
;Some roms might display download screen
IfWinActive, download
{
ControlClick, Cancel, download
Goto Error
}
If ( Fullscreen = "true" )
Send, {Esc}
GUI_ID2 := FadeInExit()
Process, WaitClose, %Executable%
7z2 := 7zCleanUp()
GUI_ID4 := FadeOutExit()
WinActivate, Hyperspin
ExitApp