Jump to content

Winclose($handle) don't works for me


Recommended Posts

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

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...