Kardus Posted November 3, 2005 Share Posted November 3, 2005 (edited) While 1 opt("TrayIconHide", 1) $url = "http://google.com" Run("rundll32 url.dll, FileProtocolHandler " & $url) WendAs an example, I want Windows to open http://google.com, wait until the page finishes loading (in internet explorer), and then close it.Also, it possible for these windows to open the the background (so I won't be seeing multiple windows open/close)? If so can anyone please tell me how to do it? Thanks. Edited November 3, 2005 by Kardus Link to comment Share on other sites More sharing options...
ame1011 Posted November 3, 2005 Share Posted November 3, 2005 i suggest taking alook at the COM functions. [font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font] Link to comment Share on other sites More sharing options...
DaleHohm Posted November 3, 2005 Share Posted November 3, 2005 (edited) Using the beta and IE.au3, you can do the following:#include <IE.au3> $oIE = _IECreate() _IENavigate($oIE, "http://www.google.com") _IEQuit($oIE)IE.au3 uses COMIE Automation UDF LibraryExamples: Post 3 in the IE Automation threadDaleWhile 1 opt("TrayIconHide", 1) $url = "http://google.com" Run("rundll32 url.dll, FileProtocolHandler " & $url) WendAs an example, I want Windows to open http://google.com, wait until the page finishes loading (in internet explorer), and then close it.Also, it possible for these windows to open the the background (so I won't be seeing multiple windows open/close)? If so can anyone please tell me how to do it? Thanks. Edited November 3, 2005 by DaleHohm Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Kardus Posted November 3, 2005 Author Share Posted November 3, 2005 (edited) Thanks a lot, that IE UDF is very useful. Now I got this: #include <IE.au3> While 1 $oIE = _IECreate() _IENavigate($oIE, "http://www.google.com") _IELoadWait($oIE) _IEQuit($oIE) Wend I want to make it open the IE windows in the background (so it won't appear on taskbar or it wont popup). So I added this: #include <IE.au3> While 1 $f_visible = 0 $oIE = _IECreate($f_visible) _IENavigate($oIE, "http://www.google.com") _IELoadWait($oIE) _IEQuit($oIE) Wend That should make it carry out the same, but in the background, right? Edited November 3, 2005 by Kardus Link to comment Share on other sites More sharing options...
DaleHohm Posted November 3, 2005 Share Posted November 3, 2005 Correct. You do not need the _IELoadWait however as that is called automatically by _IENavigate (although there is a flag to turn that off should you ever want async operation). So long as you realize that your sample code will create and destroy an invisible browser window over and over again, indefinitely then it should do what you want.DaleI want to make it open the IE windows in the background (so it won't appear on taskbar or it wont popup). So I added this:#include <IE.au3> While 1 $f_visible = 0 $oIE = _IECreate($f_visible) _IENavigate($oIE, "http://www.google.com") _IELoadWait($oIE) _IEQuit($oIE) WendThat should make it carry out the same, but in the background, right? Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Kardus Posted November 4, 2005 Author Share Posted November 4, 2005 Is there a way to open the ie window minimized (if i choose not to open them in background) Link to comment Share on other sites More sharing options...
DaleHohm Posted November 4, 2005 Share Posted November 4, 2005 (edited) Is there a way to open the ie window minimized (if i choose not to open them in background)Not directly -- that is a windows function, not a browser function. Here is an easy way to do it though:#include <IE.au3> $oIE = _IECreate() $hHWnd = _IEGetProperty($oIE, "hwnd"); get handle ; This next line won't be needed in the next IE.au3 release If Not IsHWND($hHWnd) Then $hHWnd = HWnd($hHWnd); convert to handle variant WinSetState($hHWnd, "", @SW_MINIMIZE); minimizeI'll likely add hybrid functions like this to the next IE.au3 as new _IEAction() commands.Dale Edited November 4, 2005 by DaleHohm Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble 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