robhunter Posted July 12, 2011 Share Posted July 12, 2011 Hi, I'm developing a script using IE functions, everything works great, without errors nor problems... But there's something that frustrates me. When I run the script it takes ~130 secs to run, but if I open manually an IE window, and then run the script, it only takes ~25 secs to run... Maybe it's windows and it fantastic memory administration? Can someone help me decreasing the run time without always having an IE window open..? Thanks in advice! Link to comment Share on other sites More sharing options...
JohnOne Posted July 12, 2011 Share Posted July 12, 2011 I'm guessing your script runs IE? It would explain a lot. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
robhunter Posted July 12, 2011 Author Share Posted July 12, 2011 I'm guessing your script runs IE? It would explain a lot. This is the code I use for IE, i just get the content of a table, so yes.. it runs IE =/ am I doing bad? $oIE = _IECreate($uPrincipal & $sURL, 0, 0) $oTable = _IETableGetCollection($oIE, 1) $aTableData = _IETableWriteToArray($oTable, True) _IEQuit($oIE) Link to comment Share on other sites More sharing options...
JohnOne Posted July 13, 2011 Share Posted July 13, 2011 No, your code has to load Internet Explorer and its dependencies. I'm going out on a limb here but if IE is already running, its half the battle, and your script will repond quicker. Thats my logic anyway. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
robhunter Posted July 13, 2011 Author Share Posted July 13, 2011 No, your code has to load Internet Explorer and its dependencies.I'm going out on a limb here but if IE is already running, its half the battle, and your script will repond quicker.Thats my logic anyway.I understand...So I must use RUN function to load IE and it will improve run time... But I need to have the windows hidden, to run everything on background... Also, if I RUN IE, wont it take so long to load every time I run the script? I need the script to be finished in less than 30 secs Link to comment Share on other sites More sharing options...
JohnOne Posted July 13, 2011 Share Posted July 13, 2011 Well I actually thought you were using _IEAttach() with your manually started browser instead of _IECreate() to start a new instance. Anyway, with this simple test, I get shorter times, when an IE window is already loaded than when it is not. #include <IE.au3> $timer = TimerInit() $oIE = _IECreate("www.google.com") MsgBox(0,"result",Round(TimerDiff($timer),2)) Although only marginal, nowhere 100 seconds. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
robhunter Posted July 13, 2011 Author Share Posted July 13, 2011 Well I actually thought you were using _IEAttach() with your manually started browser instead of _IECreate() to start a new instance. Anyway, with this simple test, I get shorter times, when an IE window is already loaded than when it is not. #include <IE.au3> $timer = TimerInit() $oIE = _IECreate("www.google.com") MsgBox(0,"result",Round(TimerDiff($timer),2)) Although only marginal, nowhere 100 seconds. I have various scripts that does the same with different URL... So I thought if I do _IEAttach I can mess everything :S I have thoose scripts running at the same time. Maybe the best way is to RUN IE and then _IEAttach()? I need clean and fast results Link to comment Share on other sites More sharing options...
JohnOne Posted July 13, 2011 Share Posted July 13, 2011 Are you certain of your findings? and its not just that some urls load quicker than others, or that simply somtimes the url will load faster than another time. The behaviour you decribe seems rather odd to me. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
robhunter Posted July 13, 2011 Author Share Posted July 13, 2011 Are you certain of your findings? and its not just that some urls load quicker than others, or that simply somtimes the url will load faster than another time.The behaviour you decribe seems rather odd to me.Basically what I need is to know if there's any way to quickly use IECreate without having an IE window already open... If there's no, then I just leave a window open 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