Hi guys, I know this is off topic but no one wants to answer me on the autohotkey forums and I am convinced this is a simple fix.

I found a generic pausing script in the AHK forums that I'm using with arcade PC games and other emulators that don't have a built in Pause key and don't play nice with RL's native pause feature. Pressing a key just pauses the process then resumes it if you hit it again.

What I want to know is how to have multiple processes listed in the script versus just the one so I don't have to have one script per PC game/emulator.

This is the stock script:
Code:
e::
toggle:=!toggle 
if toggle
Process_Suspend("game.exe") 
else
Process_Resume("game.exe")
return
Exitapp

;============================== Working on WinXP+
Process_Suspend(PID_or_Name){
    PID := (InStr(PID_or_Name,".")) ? ProcExist(PID_or_Name) : PID_or_Name
    h:=DllCall("OpenProcess", "uInt", 0x1F0FFF, "Int", 0, "Int", pid)
    If !h   
        Return -1
    DllCall("ntdll.dll\NtSuspendProcess", "Int", h)
    DllCall("CloseHandle", "Int", h)
}

Process_Resume(PID_or_Name){
    PID := (InStr(PID_or_Name,".")) ? ProcExist(PID_or_Name) : PID_or_Name
    h:=DllCall("OpenProcess", "uInt", 0x1F0FFF, "Int", 0, "Int", pid)
    If !h   
        Return -1
    DllCall("ntdll.dll\NtResumeProcess", "Int", h)
    DllCall("CloseHandle", "Int", h)
}

ProcExist(PID_or_Name=""){
    Process, Exist, % (PID_or_Name="") ? DllCall("GetCurrentProcessID") : PID_or_Name
    Return Errorlevel
}
What I'm trying to do is:
Code:
e::
toggle:=!toggle 
if toggle
Process_Suspend("game.exe" or "emulator.exe" or "emulator2.exe") 

else
Process_Resume("game.exe" or "emulator.exe" or "emulator2.exe") 
return
Exitapp

;============================== Working on WinXP+
Process_Suspend(PID_or_Name){
    PID := (InStr(PID_or_Name,".")) ? ProcExist(PID_or_Name) : PID_or_Name
    h:=DllCall("OpenProcess", "uInt", 0x1F0FFF, "Int", 0, "Int", pid)
    If !h   
        Return -1
    DllCall("ntdll.dll\NtSuspendProcess", "Int", h)
    DllCall("CloseHandle", "Int", h)
}

Process_Resume(PID_or_Name){
    PID := (InStr(PID_or_Name,".")) ? ProcExist(PID_or_Name) : PID_or_Name
    h:=DllCall("OpenProcess", "uInt", 0x1F0FFF, "Int", 0, "Int", pid)
    If !h   
        Return -1
    DllCall("ntdll.dll\NtResumeProcess", "Int", h)
    DllCall("CloseHandle", "Int", h)
}

ProcExist(PID_or_Name=""){
    Process, Exist, % (PID_or_Name="") ? DllCall("GetCurrentProcessID") : PID_or_Name
    Return Errorlevel
}
But whenever there is more than one process listed it doesn't work. How can I have it work with multiple process names?

FWIW thanks