4b0082 Posted November 19, 2014 Share Posted November 19, 2014 (edited) 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. 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 November 19, 2014 by 4b0082 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 19, 2014 Moderators Share Posted November 19, 2014 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 More sharing options...
4b0082 Posted November 19, 2014 Author Share Posted November 19, 2014 Edit: Also, setting $iTakeFocus to 0 doesn't change anything. Link to comment Share on other sites More sharing options...
computergroove Posted November 19, 2014 Share Posted November 19, 2014 I have been able to do just this with a virtual machine running minimized. Can I ask why you want to do this in the background? Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
4b0082 Posted November 19, 2014 Author Share Posted November 19, 2014 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 More sharing options...
Solution 4b0082 Posted November 19, 2014 Author Solution Share Posted November 19, 2014 Well, I'm not sure what the problem was - but it looks like it's gone now. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now