Sign in to follow this  
Followers 0
PTN

AutoIt version 3.3.12.0 and Internet Explorer 11

6 posts in this topic

After upgrading to IE 11 from IE 9, we noticed that the line of code below returns a wrong PID and the show_flag stopped working as well.

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

 

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

And it's the only instance of IE running?


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.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

yup.

Even when we have multiple instances of IE opened, the returned PID didn't match up with any active PIDs listed under iexplorer.exe processes.

Edited by PTN

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0