Sign in to follow this  
Followers 0
ReFran

Winclose($handle) don't works for me

3 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by pdaughe

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by ReFran

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