Jump to content

AutoIt version 3.3.12.0 and Internet Explorer 11


PTN
 Share

Recommended Posts

  • Moderators

Ok, now my curiosity is peeked.

How exactly do you know it's returned the wrong IP?

And I will say, I have run into this issue with IE before if I was already running one and launched this way.  It returned the primary IE's pid, but that has nothing to do with AutoIt.

Edit:

Also, are you working with this page as an object, or just the PID.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

When I ran this line and msgbox'd out the returned PID, I got 6180; however, the get-process command from powershell returned a different PID.  I noticed this because the "ProcessClose" failed to close the process with the returned PID because it can't find it.

$rcRun = Run(@ProgramFilesDir & "Internet ExplorerIEXPLORE.EXE -nohangrecovery -extoff http://www.google.com", @ProgramFilesDir & "Internet Explorer", @SW_HIDE)

MsgBox(0, '', $rcRun)

ProcessClose($rcRun)

 

We have a logon process to access a specific URL in the background and close it after the page is opened.

Edited by PTN
Link to comment
Share on other sites

  • Moderators

Fun times... Like I said, I've seen this happen, when I was trying to capture the browser object from the PID.

See if this works:

'?do=embed' frameborder='0' data-embedContent>>

Download the library... use the _IEJS_CreateWithParams() function.

From your code, it would look something like:

#include "IEJS.au3"; put in same directory as your script
Global $goIEPID = 0
Global $goIE = _IEJS_CreateWithParams("http://www.google.com", "-nohangrecovery -extoff", 0, 0)
If IsObj($goIE) Then
    $goIEPID = WinGetProcess($goIE.hwnd)
EndIf
; $goIEPID has your PID

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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