smcombs Posted April 16, 2009 Posted April 16, 2009 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
smcombs Posted April 16, 2009 Author Posted April 16, 2009 Ok I may have found my fix. May try a ProcessWait or something any other suggestions would be awesome
Regency Posted April 16, 2009 Posted April 16, 2009 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
Authenticity Posted April 16, 2009 Posted April 16, 2009 Each process own a window to send a message to?
smcombs Posted April 16, 2009 Author Posted April 16, 2009 Each process own a window to send a message to?No they are all just scripts basically.
Authenticity Posted April 16, 2009 Posted April 16, 2009 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.
smcombs Posted April 16, 2009 Author Posted April 16, 2009 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now