Sign in to follow this  
Followers 0
smcombs

Pausing Multiple exe"s already running

7 posts in this topic

Ok I have multiple exe's that I have created that all work together and I need to pause them all at the same time. I am using the Toggle Pause Function in each exe however they do not all pause at the same time when I hit pause break which I kinda figured would happen. Is it possible for me to perform like a process pause on these exe's. By the way all exe's are created with Autoit. I had all my code in one script but my if statements were taking too much time because I had them nested so I put them in their own exe

Thanks

Share this post


Link to post
Share on other sites



Ok I may have found my fix. May try a ProcessWait or something any other suggestions would be awesome

Share this post


Link to post
Share on other sites

Umm, have a chain of pauses, have [pause] for the first one, and in that function, it sends the key to pause the next, and so on

Share this post


Link to post
Share on other sites

Each process own a window to send a message to?

Share this post


Link to post
Share on other sites

Each process own a window to send a message to?

No they are all just scripts basically.

Share this post


Link to post
Share on other sites

Well, I don't see any necessity for it but you can at least consider it. You can create a process to process the pause hot-key and use PostMessage to the entire top-level windows in the system like:

#include <WinAPI.au3>
HotKeySet('{PAUSE}', 'Pause')
Global $fPause = False
$MyMsg = _WinAPI_RegisterWindowMessage('___MyMessage')

.
.
.

Func Pause()
    $fPause = Not $fPause
    If $fPause Then
        _WinAPI_PostMessage(0xFFFF, $MyMsg, True, 0)
    Else
        _WinAPI_PostMessage(0xFFF, $MyMsg, False, 0)
    EndIf
EndFunc

For each process you create, you can create invisible window and then use GUIRegisterMsg using this message string "$MyMsg = _WinAPI_RegisterWindowMessage('___MyMessage')". If $wParam = True then the process pause, otherwise it's resumed.

Share this post


Link to post
Share on other sites

Ok yeah awesome thanks very much. I was also thinking about having each exe have a processwaitclose in it to check for another process that I could create from my script that is going to be doing the pausing. Lol, my brain is warped now. Thanks for the help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0