0
votes

I am trying to write a VBScript for getting hold of a IE Tab which is already opened(After which i will get the Form ID and use it to post AJAX Post request with some data and update the server). I know a possible method which would work for me , (i.e.) using the Title of every IE Tab i can match with my site name which i would like to get hold of and then get the corresponding IE Instance, but this is a performance issue for me. So this is what i am planning to do , i can possibly create a local file from my Website with the process ID of my IE tab and any other detail required by the VBScript to grab this Tab among all other opened IE Tabs. In My VBScript i would run through this file which was updated from my Web-page(Using a Applet since it should create the file in client side) , identify the parameters of the IE tab in which my Web-Page is displayed and then use those details to Get hold of the Corresponding IE Instance.

Please Help me in identifying which parameters i would need to update in my File (like process ID , etc..) so that VBScript would be able to recognize my web-page even without searching through all the open IE Instances.

Any sample example of the VBScript would be very much appreciated.. Thanks a bunch in Advance :)

1

1 Answers

0
votes

Tabs of running Internet Explorer instances can be enumerated like this:

For Each ie In CreateObject("Shell.Application").Windows
  If ie.document.location = "..." Then
    'do stuff
    Exit For
  End If
Next

Why do you think performance would be an issue with this approach?