Jump to content

Recommended Posts

Posted (edited)

If the IE window identified by $oIE is closed by someone or something, I would like the script to exit.

Any help would be appreciated.

Thanks,

Bre

Edited by BreCalmor
Posted

So, how do I figure if it exists? Probably something to do with the windows handle, but a search through the help and udf help didn't come up with anything I thought would work.

Bre

Posted

If ProcessExists("process") Then
   Actionshere
Else
   Exit
EndIf
This requires a name or a pid. I will have a multiple IE windows open with the same title. So how do I find the PID if all I have is the hwnd?
Posted

WinExists? Didnt look too well into the helpfile.

# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Posted

WinExists? Didnt look too well into the helpfile.

Which part of "I will have a multiple IE windows open with the same title." did you miss.

Identifying a specific IE window by title WON'T WORK.

Next...

Posted (edited)

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
Posted (edited)

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- #
Posted

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

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
×
×
  • Create New...