Jump to content

Another Stupid IE Question: Open in Background?


4b0082
 Share

Go to solution Solved by 4b0082,

Recommended Posts

I have two version of a script opening IE to load data, then closing - script 'a' opens IE in the background without dragging the application to the front and disrupting activity (scrolling, typing, etc.) - script 'b' opens IE in the foreground and disrupts activity.

Why is script 'a' functioning differently than 'b'? Is there a way I can dictate that the script opens IE in the background so it won't interfere with whatever I'm doing while my program runs in the background?

I've also tried replacing _IEQuit with ProcessClose("iexplore.exe") and it doesn't make a difference. Both these scripts would start at the same location in the main code, so I'm not sure why _IECreate is behaving so differently.

Sorry ahead of time SmOke_N if this is related to the problem you mentioned in another thread.  :sweating: 

Edit: Also, setting $iTakeFocus to 0 doesn't change anything.

Script A:

For $cPage = 0 to $tPage-1 ; -- Opens and closes 5 IE, one at a time.
   $oIE = _IECreate($url[$cPage], 0, 0)
   Sleep(2000)
   _IEQuit($oIE)
Next

Script B:

$oIE = _IECreate($url[0], 0, 0) ; -- Opens the first tab.

   For $cPage = 1 to $tPage-1 ; -- Opening 4 additional tabs.
      Sleep(2000)
      $oIE.Navigate($url[$cPage], 0x0800)
   Next

   For $cPage = 1 to $tPage-1 ; -- Close each tab.
   _IEQuit($tab[$cPage])
   Next
Edited by 4b0082
Link to comment
Share on other sites

  • Moderators

In the helpfile, look at the last parameter of _IECreate

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

It's monitoring the status of websites. I actually want to run this in hidden mode, but it's still interrupting my activity and I narrowed it down to the _IECreate and Navigate that's causing the problem. I still haven't found a solution; when I replace the working _IECreate with the one that's causing problems it still causes problems in the alternative script, so I'm not sure what the issue is.

It's the same links, same website, same order, so it's got to be something about the code.

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