Jump to content

[Solved] How to exit script when IE is closed


 Share

Recommended Posts

In my helpfile I have this (under IE management UDF):

_IEPropertyGet($oIE, "hwnd")

True, which is what I have, but nothing to do with it... I don't see a function that checks the existence of an application by hwnd, only by exe, pid, title or what not. If I could figure out a way to get the PID for a particular HWND, then the problem would be solved.

Which part of helpfile did you miss?

EDIT::

MsgBox(0, "", WinExists(WinGetHandle("")))
WinGetHandle ( "title" [, "text"] )

I will have a multiple IE windows open with the same title.

Guess I don't need to say any more...

Wanna try again, or are you going to actually read my post?

Edited by BreCalmor
Link to comment
Share on other sites

I guess you didnt try out my example. How about you TRY it first?

EDIT::

Heres a tip. REPLACE THE WINGETHANDLE, TO THE IE HANDLE?

MAGIX?

Edited by AzKay
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

I guess you didnt try out my example. How about you TRY it first?

EDIT::

Heres a tip. REPLACE THE WINGETHANDLE, TO THE IE HANDLE?

MAGIX?

I didn't try it out, sorry. According to the help file, it shouldn't have worked.

I did see your edit and tried it:

$oIE = _IECreate ($sWebSite, 0, 1, 1, 1)
$hWnd_Active = _IEPropertyGet($oIE, "hwnd")
While WinExists ($hWnd_Active)
   ; All the program stuff
Wend
This does appear to work, although I don't know why. The help file doesn't say you can use a hwnd, and you didn't say you could.

Sorry to have doubted, but maybe explaining it a little would have made more sense.

Thank you for your help and solution !!

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...