ReFran Posted March 19, 2007 Share Posted March 19, 2007 Hi, I try following $handle = Run("C:\Programme\Adobe\Acrobat 7.0\Reader\AcroRd32.exe") msgbox(0,"",$handle) ;WinClose($handle) ProcessClose($handle) ProcessClose works, but WinClose($handle) works not. I want to use WinClose($handle), because that - doesn't close Reader during printig (ProcessClose close also during printing) - and allow to handle different instances of Reader. I'm doing something wrong or why it doesn't work? Best regards, Reinhard Link to comment Share on other sites More sharing options...
pdaughe Posted March 19, 2007 Share Posted March 19, 2007 (edited) Oops -- Run returns the PID, not the window handle of the started process. Once you have the PID, you can find the window. Search the forums -- there are already functions written to do that using WinList () and WinGetProcess. Edited March 19, 2007 by pdaughe Link to comment Share on other sites More sharing options...
ReFran Posted March 19, 2007 Author Share Posted March 19, 2007 (edited) Oops -- Run returns the PID, not the window handle of the started process.Once you have the PID, you can find the window. Search the forums -- there are already functions written to do that using WinList () and WinGetProcess.I see, mixed it up.So WinGetHandle seems to be the only possibility to get the $handle, also if the PID is given.Thank you, Reinhard Edited March 19, 2007 by ReFran Link to comment Share on other sites More sharing options...
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