Alterego Posted May 29, 2005 Posted May 29, 2005 (edited) I developed this because I am working with a program that does not have traditional GUI controls, meaning it definitely did not respect @SW_HIDE, and I wanted to completely move it off the screen before it had a chance to think. I was successful except for the brief flash of the splash screen. With this snippet of code and some trial and error timing, I was able to freeze the splash screen and get the title. As you will see with this code, notepad is frozen so quickly that it doesn't have a chance to draw the GUI.You will need to download process explorer from sysinternals and drop procexp.exe in your @WindowsDir.;$letter equals the first letter of the process name. ;If the process will be the second, third etc... starting ;with that letter, enter the key n times to arrive at the ;correct process, e.g, _suspend('notepad.exe','nnn) $process = 'notepad.exe' $letter = 'n' Run($process,'',@SW_HIDE) _suspend($process,$letter) Func _suspend($process,$letter) Run("procexp.exe",'',@SW_HIDE) WinActivate("Process") ControlSend("Process",'',101,$letter & "!p{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}") ProcessClose("procexp.exe") EndFuncEdit: Just call _suspend() again to resume the process!suspend.au3 Edited May 29, 2005 by Alterego This dynamic web page is powered by AutoIt 3.
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