Jump to content

Recommended Posts

Posted

Hello,

I will try and explain my issue best i can without the code as i'm not at work and cannot provide it at this point in time,

Once in work tomorrow i can post the code if needed.

Ive wrote a code at work that uses IEAttach command to attach to a internet window by URL.

However sometimes it is necessary to have 2 of these windows open and they both have the exact same URL and i need it to attach to the "active" most "recent" window however it will always attach to the previous "first" window open.

Is there a way to define the new window over the old one without closing the original? perhaps a different form of "attaching" rather than URL?

Sorry if i'm not being clear if needed i can post my code first thing in the morning.

Thanks

Ant.

Posted

Thanks for the reply however i'm not quite sure what you mean i have not used HWD or Winhandles befor

$sUrl = "http://172.30.238.40/CAisd/html/popup_frames.html?POPUP_URLIX=1+popupType=1"
$oIE = _IEAttach($sUrl, "url")
If not isObj($oIE) Then
  $sUrl = "http://172.30.238.40/CAisd/html/popup_frames.html?POPUP_URLIX=0+popupType=1"
    $oIE = _IEAttach($sUrl, "url")
 If not isObj($oIE) Then
msgbox("", "Error// Mismatch address", "An error occurred, Reload application. If error persists contact Anthony")
exit

 

This is my current form of attaching where/how would i incorporate this into the script?
Many thanks

 

Ant.

  • 2 weeks later...
Posted

Hey sorry for late reply ive only just rememberd i posted this issue, i tried using this method however i always get _IEAttach, $_IEStatus_NoMatch

thats with any window.

Posted

This one should help you :

$test = ProcessList("iexplore.exe")
_ArrayDisplay($test)
Exit

That way you can choose to which instance to attach to , and not rely on the active window !

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
  • Recently Browsing   0 members

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