AHK wiz I am not but I'm trying to edit Sir Cheddars ahk script. If I have the script in the same dir as the PinballArcade.exe it works.
I usually dump all my scripts in the game folder so in this case D:\Pinball Arcade\Scripts. If the same ahk script is in that folder it doesn't kick off PA. What am I missing??
ProgFiles := ProgFiles32()
dcworkdir =
dcparamlandscape =
dcparamportrait =
dcexe =
PAworkdir = D:\Pinball Arcade\
IfExist, %ProgFiles%\iRotate\iRotate.exe
{
dcworkdir = %ProgFiles%\iRotate\
dcparamlandscape = /rotate=0
dcparamportrait = /rotate=90
dcexe = iRotate.exe
} Else {
IfExist, %ProgFiles%\12noon Display Changer\dccmd.exe
dcworkdir = %ProgFiles%\12noon Display Changer\
IfExist, c:\Hyperpin\dccmd.exe
dcworkdir = c:\Hyperpin\
dcparamlandscape = -rotate=up
dcparamportrait = -rotate=right
dcexe = dccmd.exe
}
run, "%dcworkdir%%dcexe%" %dcparamportrait%
;RegRead, SteamDirPath, HKLM, Software\Valve\Steam, InstallPath
;Run, "%SteamDirPath%\Steam.exe" -applaunch 238260
Run, "%PAworkdir%PinballArcade.exe"
Process, wait, PinballArcade.exe
process, WaitClose, PinballArcade.exe
run, "%dcworkdir%%dcexe%" %dcparamlandscape%
ExitApp
;Function copied from http://www.disavian.net/finding-program-files-64bit-autohotkey/
ProgFiles32()
{
EnvGet, ProgFiles32, ProgramFiles(x86)
if ProgFiles32 = ; Probably not on a 64-bit system.
EnvGet, ProgFiles32, ProgramFiles
Return %ProgFiles32%
}
;;You can change keybindings here if needed
;#IfWinActive ahk_class Pinball Arcade
;1::Enter
;e::Escape
;#IfWinActive
;RegRead, SteamDirPath, HKLM, Software\Valve\Steam, InstallPath
;Run, "%SteamDirPath%\Steam.exe" -applaunch 238260
Edited by zeenon, 26 November 2013 - 11:59 PM.