Kyan Posted March 30, 2012 Share Posted March 30, 2012 (edited) I'm trying to get all the forms from a webpage with IE9 but it fails, when I use IE7 it works well example: $oIE = _IECreate("http://www.autoitscript.com/forum/forum/2-general-help-and-support/",0,1) _IELoadWait($oIE) $oForms = _IEFormGetCollection($oIE) For $oForm In $oForms If $oForm.action = "http://www.autoitscript.com/forum/index.php?app=members&module=profile&section=status&do=new&k=11ff2f67547580c4d5509e68d3076885&id=56929" Then MsgBox(0,"","Found") EndIf Next Edited April 6, 2012 by DiOgO Heroes, there is no such thing One day I'll discover what IE.au3 has of special for so many users using it.C'mon there's InetRead and WinHTTP, way better Link to comment Share on other sites More sharing options...
DaleHohm Posted March 30, 2012 Share Posted March 30, 2012 Make certain you're running the most recent version of AutoIt - check the release notes. 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...
Kyan Posted March 31, 2012 Author Share Posted March 31, 2012 SciTE v2.28 and AutoIT v3.3.8.1, something wrong? Heroes, there is no such thing One day I'll discover what IE.au3 has of special for so many users using it.C'mon there's InetRead and WinHTTP, way better Link to comment Share on other sites More sharing options...
DW1 Posted March 31, 2012 Share Posted March 31, 2012 I think the issue is the string that you are testing against... For me, the "&" in your test string is shown simply as "&". Try this and see what actions are found: #include <IE.au3> $oIE = _IECreate("http://www.autoitscript.com/forum/forum/2-general-help-and-support/", 0, 1) _IELoadWait($oIE) $oForms = _IEFormGetCollection($oIE) For $oForm In $oForms MsgBox(0,'test',$oForm.action) Next AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Kyan Posted March 31, 2012 Author Share Posted March 31, 2012 I think the issue is the string that you are testing against... For me, the "&" in your test string is shown simply as "&". Try this and see what actions are found: #include <IE.au3> $oIE = _IECreate("http://www.autoitscript.com/forum/forum/2-general-help-and-support/", 0, 1) _IELoadWait($oIE) $oForms = _IEFormGetCollection($oIE) For $oForm In $oForms MsgBox(0,'test',$oForm.action) Next in that way works, but I want to save the form name or handle (I don't know how its called) to a variable in order to use for <input> writting but the output is always empty for example: #include <IE.au3> $oIE = _IECreate("http://www.autoitscript.com/forum/forum/2-general-help-and-support/", 0, 1) _IELoadWait($oIE) $oForms = _IEFormGetCollection($oIE) For $oForm In $oForms if StringInStr($oForm.action,"forum/index.php?",0,1) <> 0 Then $myForm = $oForm endif Next msgbox(0,"",$myForm) Heroes, there is no such thing One day I'll discover what IE.au3 has of special for so many users using it.C'mon there's InetRead and WinHTTP, way better Link to comment Share on other sites More sharing options...
DaleHohm Posted April 4, 2012 Share Posted April 4, 2012 You won't get what you expect sending an Object variant to MsgBox. 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...
Kyan Posted April 6, 2012 Author Share Posted April 6, 2012 You won't get what you expect sending an Object variant to MsgBox.Daleyap, you're right Heroes, there is no such thing One day I'll discover what IE.au3 has of special for so many users using it.C'mon there's InetRead and WinHTTP, way better 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