Sign in to follow this  
Followers 0
ss3vegeta

IE.au3 _IEFormGetObjByType()

7 posts in this topic

#1 ·  Posted (edited)

I've got the IE.au3 included and have been succesful with filling forms so far, however I've run into a bit of an issue. How do I submit a form that only has the following?

<INPUT type=submit value=Submit>

I can't use the get object by name or ID functions. I'm a bit lost, if anyone could help I'd greatly appreciate it.

ss3

Edit: To clarify, as far as I can tell the forms have no names or ID's, just actions tied to them, and the submit button doesn't have a name or ID either. I'm not sure how I can actually submit the forms.

<FORM onsubmit="return ValidForm(this);" action=http://smoothies.com/fmp/forms/formprocessorpro.php method=post encType=multipart/form-data><INPUT type=hidden value=47d11c7a03d017fda06f22750e0926a649ad7db1ddf91 name=___form_id_>

Edited by ss3vegeta

Share this post


Link to post
Share on other sites



You tried _IEFormSubmit?


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

Share this post


Link to post
Share on other sites

Yes I have been trying everything I can think of. From the example file that goes with the IE.au3:

$oIE = _IECreate ("http://www.google.com")
$oForm = _IEFormGetObjByName ($oIE, "f")
$oQuery = _IEFormElementGetObjByName ($oForm, "q")
_IEFormElementSetValue ($oQuery, "AutoIt IE.au3")
_IEFormSubmit ($oForm)oÝ÷ Ù8^¦ºé¨§ËajÛayú+¬Úê+ ;(!ƧßÛlk&®¶­sbb33c¶ôf÷&ÒÒôTf÷&ÔvWDö&¤'æÖRb33c¶ôRÂgV÷C²gV÷C²²FW&R2æòæÖRFòç6W'BÂ6ò6âb33·B6VVÒFòvWBFRf÷&Ò2âö&¦V7@oÝ÷ ØéÚ­éZµçg¢×¢Ø^ F®Ýø¥zØ^­æ«y©h¶Ü¡×¬¶¸§ÉbëaÆ®¶­se7G&ærb33c¶õöö&¦V7BçF÷æFö7VÖVçBç&VG7FFRÒgV÷C¶6ö×ÆWFRgV÷C²÷"b33c¶õöö&¦V7BçF÷æFö7VÖVçBç&VG7FFRÒB÷"b33c¶eô&÷'

I'm fairly new to autoit so I'm not sure what the periods denote ($o_object.top.document.readyState). I more familiar with c++ so this looks to me like accessing variables and member functions of a class. My question is; where can I find a complete list or tree of what can be accessed in this manner?

Share this post


Link to post
Share on other sites

See the Remarks in the helpfile for _IEForm*GetObjByName which points you to _IEForm*GetCollection which allows you to get references by index instead of name.

The dot syntax is OO, COM. Used to identify object and associated properties, methods and events. See the links in my sig for more information on this topic.

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

Share this post


Link to post
Share on other sites

Thanks for the replies. I think maybe I'm not being completely clear. If I use code similar to this:

$oIE = _IECreate ("http://www.google.com")
$oForm = _IEFormGetCollection ($oIE, 0)
_IEFormSubmit ($oForm)

How do I submit the form, without using the _IEFormSubmit? I need to simulate a real click or focus on the button itself and send("{ENTER}"). Again the forms have no name or ID, and neither do the submit buttons. I'm looking for a way to focus on the submit button. Is there a way to parse $oForm and return an object that is the submit button? If so then I can use _IEAction.

Thanks,

ss3

Share this post


Link to post
Share on other sites

Yes, for example, see here: #440316

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

Share this post


Link to post
Share on other sites

Yes, for example, see here: #440316

Dale

Dale, you are awesome. That's exactly what I was asking.

Thanks,

ss3

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0