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. My bare hosting costs are currently not met so please consider donating by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

This Script will pause any process. I have tested it on Karafun, Dolphin, Project64, ZSNES, FreeDO, Sega CD, SSF, and PSX.

I know, some of those emulators have a pause key, But the ones I checked had sound stuttering while paused. With this script, that won't happen.

Plus, one key will pause anything, with no setup required. Tested on XP Pro 64.

1. Run Pause.exe

2. Press 'P' to pause

3. Press 'P' to unpause

Pause Process.7z

  • Like 1
Posted

This Script will pause any process. I have tested it on Karafun, Dolphin, Project64, ZSNES, FreeDO, Sega CD, SSF, and PSX.

I know, some of those emulators have a pause key, But the ones I checked had sound stuttering while paused. With this script, that won't happen.

Plus, one key will pause anything, with no setup required. Tested on XP Pro 64.

1. Run Pause.exe

2. Press 'P' to pause

3. Press 'P' to unpause

Pause Process.7z

Cool. This looks something I could use in GameEx at a future date. Any chance i can have the source?

Cheers.

Posted

Great app Matt. I love the idea and it can be really usefull. I know Tom implmented a Timer app, so perhaps it can be coded that if the game is not paused then run the idle timer. If so then dont.

Great idea.

Good job.

Posted

Nice work Tempest can't wait to give this a blast, when I build my new control panel I added a pause key but then discovered that not every emu can be paused :(

It would be really nice to see this fully incorporated into GameEx so you could have a custom key assigned

Thanks

Stu

Posted

Wow! Look at all the interest. smile.gif

I used this: http://www.beyondlogic.org/consulting/processutil/processutil.htm

Suspend & Resume Processes . . .

Processes can be suspended if you need some extra CPU cycles without having to kill the process outright. Once the requirement for the extra CPU cycles has passed you may resume the process and carry on from where you left off. The process is suspended by sleeping all the processes' active threads.

C:\>process -s winword.exe

Command Line Process Viewer/Killer/Suspender for Windows NT/2000/XP V2.01

Copyright© 2002-2003 [email protected]

Suspending PID 748 'winword.exe'Threads [1084][308]

Suspending a process causes the threads to stop executing user-mode (application) code. It also increments a suspend count for each thread. Therefore if a process is suspended twice, two resume operations will be required to resume the process (Decrement the suspend count to zero).

The only thing that they don't say is that the switch for resume is -r

My code is simple:

 

#SingleInstance Force
SetWorkingDir, %A_ScriptDir%

p::
suspend, on
Paused := !paused
If paused
{
SoundSet, 1, Master, Mute
WinGet, process, ProcessName, A
Process = %Process%
Run, Process.exe -s %Process%,, Hide
Tooltip, Paused, 20, 20
}
Else
{
Run, Process.exe -r %Process%,, Hide
SoundSet, 0, Master, Mute
Tooltip
}
KeyWait, p
suspend, Off
Return

Tom - You can use my idea on 2 conditions:

1. Take back what you said about AHK not being a 'real' programming language. tongue.gif

2. Please stop sending 'OK' to daphne... I have other programs running, and it causes my program to try and Open a file named 'K'.

  • 2 years later...
Posted

man i've been looking for something like this for a while, THANK YOU!

one question, when i exit the emu and my FE, the pause script is still running. is there a command i can give it (entered into my FE quit command) that will kill the script on exit?

thanks a ton!

Posted

What a great app, nice one tempest. Gonna use it as i have a button for pause on my cp but never used it as, now i can.

Posted

man i've been looking for something like this for a while, THANK YOU!

one question, when i exit the emu and my FE, the pause script is still running. is there a command i can give it (entered into my FE quit command) that will kill the script on exit?

thanks a ton!

Try Tskill <ScriptName> OR Taskill <ScriptName>

Posted

I'm not sure why I never released it at the time but I turned Tempests script into a GameEx plugin about a year ago.

Extract the 2 files to your GameEx plugin directory and you can configure which emulators it's activated on and what key to use.

Maybe Tempest knows why it was never release, I know he helped me test it at the time so big thanks to him... maybe there is some unresolved issues with it that I can't remember now :)

I've just tested it again with Project 64, ZSNES, SFF, Nestopia and Fusion and it seems to be working fine.

Stu

UniversalPause.zip

Posted

Try Tskill <ScriptName> OR Taskill <ScriptName>

thanks for the feedback tempest. "tskill pause" from a command line works but for some reason isn't registering from within my FE (mamewah) when i quit. i'll figure it out tho! fyi, here are the emu's that i have tested this with, works with all except where noted:

unz (fm towns)

super model (sega model 3)

nullDC (sega dreamcast)

m2 (sega model 2)

mess (multi)

winvice (commodore)

ssf (sega saturn)

pcsx2 (playstation 2)

pcx (playstation)

mednafen (multi)

fusion (sega multi)

4D0 (3D0)

winUAE (amiga / amiga cd32) - doesn't work

future pinball - doesn't work (works while the game is loading, once the table comes up, no longer works)

Posted

Your file 'universalpause.zip' virus checker says it's a Trojan!!!! At least Microsoft Security Essentials tells me that.

Ah! that would be because I am using a keyboard hook to grab the key press to pause the emulator and the antivirus thinks it's a key logging application... maybe this is the reason why I never released it :)

Stu

Posted

I'm not sure why I never released it at the time but I turned Tempests script into a GameEx plugin about a year ago.

Extract the 2 files to your GameEx plugin directory and you can configure which emulators it's activated on and what key to use.

Maybe Tempest knows why it was never release, I know he helped me test it at the time so big thanks to him... maybe there is some unresolved issues with it that I can't remember now :)

I've just tested it again with Project 64, ZSNES, SFF, Nestopia and Fusion and it seems to be working fine.

Stu

Can anyone verify that Stu's Plugin works with WinUAE, and Future Pinball? IIRC both of those Emus open more than one process, which I suspect is causing the issue with my app.

Posted

thanks for the feedback tempest. "tskill pause" from a command line works but for some reason isn't registering from within my FE (mamewah) when i quit. i'll figure it out tho! fyi, here are the emu's that i have tested this with, works with all except where noted:

unz (fm towns)

super model (sega model 3)

nullDC (sega dreamcast)

m2 (sega model 2)

mess (multi)

winvice (commodore)

ssf (sega saturn)

pcsx2 (playstation 2)

pcx (playstation)

mednafen (multi)

fusion (sega multi)

4D0 (3D0)

winUAE (amiga / amiga cd32) - doesn't work

future pinball - doesn't work (works while the game is loading, once the table comes up, no longer works)

Could you tell me what the process names are when VP, and WinUAE are running? There will be more than one for each program. Use the task Manager (Ctrl-Alt-Del) to get the process names.

Posted

thanks tempest!

this is a little weird. for future pinball, the only difference is one instance of "future pinball.exe" running. but, if i "alt+tab" to cycle thru open programs, there are TWO processes of FP running, one is titled with just the app name, the other is titled with the table that i loaded.

for amiga, same thing, one instance of "winUAE.exe" running. but "alt+tab" cycling reveals there is something opened called "form1".

tempest, with all sincerity, this app closed a HUGE gap in the way i wanted my machine to run, a BIG THANK YOU.

now if i can just figure out why "mamewah" isn't sending the "taskill pause", i'd be golden!

thank you again so much!

Posted

hey tempest,

not sure if the info i gave you was meant to help update the app. just curious if its something that is possible and that you are thinking about or is it just something i'll need to be cool with. again, trust me, i'm happy as is, just curious if you'll be updating is all so i can unsubscribe to this post :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...