randallc Posted July 24, 2005 Share Posted July 24, 2005 Hi Dale, Am I correct to think that "_IELoadWait" is working now, too? Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
DaleHohm Posted July 24, 2005 Author Share Posted July 24, 2005 Hi Dale,Am I correct to think that "_IELoadWait" is working now, too?Randall<{POST_SNAPBACK}>It should work much more consistantly now -- I changed it to work on the Document object and to use readyState instead of busy as an indicator.It will get more attention with the ObjName function in the next release.Dale 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...
amphoterous Posted July 24, 2005 Share Posted July 24, 2005 I realize that this is the "Internet Explorer" automation, but perhaps in the future you could add support for Firefox. That would make me very, very happy. Link to comment Share on other sites More sharing options...
Valik Posted July 24, 2005 Share Posted July 24, 2005 I realize that this is the "Internet Explorer" automation, but perhaps in the future you could add support for Firefox. That would make me very, very happy. <{POST_SNAPBACK}>You're assuming Firefox has an exposed object model to manipulate. It doesn't. Link to comment Share on other sites More sharing options...
amphoterous Posted July 24, 2005 Share Posted July 24, 2005 You're assuming Firefox has an exposed object model to manipulate. It doesn't.<{POST_SNAPBACK}>And that's the reason I am a noob at the moment when it comes to these things. I don't know anything about the "exposed object models" but regardless... Shouldn't there be a different way to add automation to firefox? Link to comment Share on other sites More sharing options...
SvenP Posted July 24, 2005 Share Posted July 24, 2005 (edited) Dale, SetError(0) $tmp = ObjName ($a) If @error = 1 Then $tmp = " " If $tmp = "0" Then $tmp = " " The latest version of ObjName does not set an error anymore. It returns "" if no name could be found. It was a bug that it throwed an error in the preliminary version, now it's according to the documentation. EDIT: This version of ObjName will be included in 3.1.1.64. Regards, -Sven Edited July 24, 2005 by SvenP Link to comment Share on other sites More sharing options...
DaleHohm Posted July 24, 2005 Author Share Posted July 24, 2005 Dale,SetError(0) $tmp = ObjName ($a) If @error = 1 Then $tmp = " " If $tmp = "0" Then $tmp = " "The latest version of ObjName does not set an error anymore. It returns "" if no name could be found. It was a bug that it throwed an error in the preliminary version, now it's according to the documentation.EDIT: This version of ObjName will be included in 3.1.1.64. Regards,-Sven<{POST_SNAPBACK}>Fantastic, thanks Sven. That will save A LOT of conditional code. It should also prevent the need for me to set an error handler for this and have to deal with whether there is already one declared.Dale 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...
randallc Posted July 26, 2005 Share Posted July 26, 2005 (edited) Hi, Dale,I am having to use the old version still of ie.au3 due to timing difficulties.Remember my query and your response.... Am I correct to think that "_IELoadWait" is working now, too? ; unfortunately I am still having to use my old pause mechanisms.Additionally, I sometimes find the object not retrieved fully before next command after various issues;1. Navigate.[? also ? or ?same prob?2. ObjQuit. (and re-start a new object)]I have 3 other questions, though;A. Should I be re-writing my WebLogin macro with these other functions, and not bothering with forms?B. I have a workaround by excising text from html for boosting an "iframe" site; are you likely to tackle that problem? [Looks complicated for different versions of windows etc as far as I can see]C. I don't have a workaround inside "com" for boosting an "non-standard" login button (java etc); are you likely to tackle that problem?Thanks for your thoughts,Randall Edited July 26, 2005 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
DaleHohm Posted July 26, 2005 Author Share Posted July 26, 2005 With the ObjName function available now, I think that most everything can be solved. If your issues lie with Frames, things work with the basics, but there needs to be some focused time spent here that I have not done yet for T1.4Regarding your other questions, for 1. please supply a small reproducer. For A., not sure what "other functions" you are talking about -- there are multiple ways of referencing objects in the DOM, so you need to choose which you prefer. For B., see the frames comments above. For C., a small example would help, but it make take your own research into the DOM to see how to reference the object and .Click it.DaleHi, Dale,I am having to use the old version still of ie.au3 due to timing difficulties.Remember my query and your response.... ; unfortunately I am still having to use my old pause mechanisms.Additionally, I sometimes find the object not retrieved fully before next command after various issues;1. Navigate.[? also ? or ?same prob?2. ObjQuit. (and re-start a new object)]I have 3 other questions, though;A. Should I be re-writing my WebLogin macro with these other functions, and not bothering with forms?B. I have a workaround by excising text from html for boosting an "iframe" site; are you likely to tackle that problem? [Looks complicated for different versions of windows etc as far as I can see]C. I don't have a workaround inside "com" for boosting an "non-standard" login button (java etc); are you likely to tackle that problem?Thanks for your thoughts,Randall<{POST_SNAPBACK}> 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...
Binarybin Posted August 2, 2005 Share Posted August 2, 2005 Is there a way to fill in the info for a password protected site, that pops up the IE dialog? for example, i just pulled one up in google, to show you what i mean exactly.http://www.he.net/~jdoe/info/htaccess/exam...restricted.htmlso you go to a .htaccess password protected site, is there a way to lock on to that and fill in that info, like you do for other ie forms? Link to comment Share on other sites More sharing options...
DaleHohm Posted August 2, 2005 Author Share Posted August 2, 2005 Is there a way to fill in the info for a password protected site, that pops up the IE dialog? for example, i just pulled one up in google, to show you what i mean exactly.http://www.he.net/~jdoe/info/htaccess/exam...restricted.htmlso you go to a .htaccess password protected site, is there a way to lock on to that and fill in that info, like you do for other ie forms?<{POST_SNAPBACK}>I've actually spent a little time looking at this and that popup is a windows app dialog and I have found no way to get to it through COM or the DOM. The good news is that you'll be able to use the standard AutoIt functions (WinActivate, ControlSend etc) to see it and manipulate it -- you have to anticipate it appearing however and deal with it.There used to be a way to prevent it from appearing by using a URL syntax like http://username:password@www.url.com but that ability has been stripped out of recent IE versions for security reasons -- you may still be able to use it with WinHttp, but I haven't tried.It would seem logical that IE would have some sort of a state bit available through COM to let us know that the authentication dialog is being displayed, but I have found nothing that helps yet.Dale 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...
this-is-me Posted August 2, 2005 Share Posted August 2, 2005 Wait a minute. We are talking about autoit right? Why not: WinWait("Connect to www.he.net") ControlSetText("Connect to www.he.net", "", "Edit2", "username") ControlSetText("Connect to www.he.net", "", "Edit3", "password") ;ControlClick("Connect to www.he.net", "", "OK") Who else would I be? Link to comment Share on other sites More sharing options...
peethebee Posted August 3, 2005 Share Posted August 3, 2005 Hi! How do I have to use it? I use Beta 3.1.1.54 and he's saying that in line 275 ( If (ObjName($o_window.document) = "DispHTMLDocument") Then ) that ObjName is a "unknown function name". Do you know whta's wrong there? Thanks, peethebee vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Link to comment Share on other sites More sharing options...
DaleHohm Posted August 3, 2005 Author Share Posted August 3, 2005 At the top of the base note there is a line starting with the word "Important" in bold. Please read that. Also note that the Au3Check syntax checker (used by default in SciTe) will report this error even when other requirements have been met - but continuing to execution will work. Dale 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...
ptrex Posted August 4, 2005 Share Posted August 4, 2005 @Dale Great job I can use you function on my script "Firewall Log Analyser" as of now. By pressing a button I will lookup the IP address in the WHOIS database on the Internet. The only thing I didn't see, is that for those guys who are using an IExplorer Shell application (like myself using AVANT browser - a multitabbed Explorer of IE), the page are not opened in the Shell IExplorer. This is the code I use to pick up the default browser Func GetBrowser();Get Default Browser $Browser = StringSplit(RegRead("HKLM\SOFTWARE\Classes\HTTP\shell\open\command",""),"%") $HTTP = $Browser[1] & " " & "www.autoitscript.com" EndFunc Maybe you could add some check on IE shell applications being the default browser. If your function is incorporated in my "Firewall log Analyser" I will release a new version to you all !! Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
DaleHohm Posted August 4, 2005 Author Share Posted August 4, 2005 Great job I can use you function on my script "Firewall Log Analyser" as of now.The only thing I didn't see, is that for those guys who are using an IExplorer Shell application (like myself using AVANT browser - a multitabbed Explorer of IE), the page are not opened in the Shell IExplorer.Maybe you could add some check on IE shell applications being the default browser.<{POST_SNAPBACK}>Thanks, I'm glad it is useful.I understand your desire, but IE.au3 creates the browser instance using the ObjCreate COM function and not by issuing a Shell command (and more importantly, we need an Object Variable reference to the created browser in order for any of the other functions to work).You should be able to do what you want however by using _IEAttach to obtain a reference to an existing shell instance that, in your case, would be in AVANT. Note that you can attempt to _IEAttach and it it fails, run a shell command to create what you want, WinWait() for it and then use _IEAttach to get the object reference you need for all of the IE.au3 functions.Dale 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...
shism2 Posted August 6, 2005 Share Posted August 6, 2005 Is there a function or way to find out if a new button or form appears on the web page after for example pressing the submit button? Link to comment Share on other sites More sharing options...
DaleHohm Posted August 6, 2005 Author Share Posted August 6, 2005 Is there a function or way to find out if a new button or form appears on the web page after for example pressing the submit button?<{POST_SNAPBACK}>Sure. There are several ways to go about this and which one you chose would depend on what you wnated to do with the information.You can use _IEBodyReadHTML to get all of the HTML on a page before and after the submit and then compare._IEFormGetCount will teel you how many forms are on the page_IEFormGetCollection will return a collection of forms on the pageActually, take a look at this post for a generalized example of looking at the elements on a pageDale 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...
shism2 Posted August 6, 2005 Share Posted August 6, 2005 $o_form = _IEFormGetObjByName($oIE, "BKPromoForm") $o_CCBox = _IEFormElementGetObjByName($o_form, "CCBox") ; Set field values and submit the formBurger King Cash Card Redemption - Microsoft _IEFormElementSetValue($o_CCBox,"BKDF-CJ8BLP-XDDLG2" ); insert code $o_SubmitButton = $oIE.document.getElementById("SubmitBtn") $o_SubmitButton.click Mouse1() _IELoadWait($oIE,2000) _IEFormElementSetValue($o_CCBox,"" ) Ok When I try setting the CCBox to blank it does not respond..... Link to comment Share on other sites More sharing options...
DaleHohm Posted August 7, 2005 Author Share Posted August 7, 2005 $o_form = _IEFormGetObjByName($oIE, "BKPromoForm") $o_CCBox = _IEFormElementGetObjByName($o_form, "CCBox") ; Set field values and submit the formBurger King Cash Card Redemption - Microsoft _IEFormElementSetValue($o_CCBox,"BKDF-CJ8BLP-XDDLG2" ); insert code $o_SubmitButton = $oIE.document.getElementById("SubmitBtn") $o_SubmitButton.click Mouse1() _IELoadWait($oIE,2000) _IEFormElementSetValue($o_CCBox,"" )Ok When I try setting the CCBox to blank it does not respond.....<{POST_SNAPBACK}>I believe that since the page is recreated after the form submission (the click on the submit button) that the object reference to that element is no longer valid.You need to establish a new connection with $o_CCBox after the refresh.Another choice would be to reference it in a dynamic fashion like this:_IEFormElementSetValue($oIE.document.GetElementById("CCBox"))Dale 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