Sign in to follow this  
Followers 0
Vicks

ie help

8 posts in this topic

#include <IE.au3>
$IE = _IECreate("http://www.sendmefiles.com/?gclid=CKynwoz3-YUCFSOvJAodtgtpuw")
_IELoadWait($IE)

$form = _IEFormGetObjByName($IE,"Send Now")
$Email = _IEFormElementGetObjByName($form,"emailto")
;$Browse = _IEFormElementGetObjByName($Browse,"message")
_IEFormElementSetValue($Email,"vicks@hotmail.com")
_IEFormElementSetValue($Browse,"C:\test.exe")
_IEFormSubmit($form)

ok if you go to this site you should see a browse button, by the left hand side there is a input box instead of me browsing for my file ill would like to just to insert the path in the input box, but i can't find the code for that input box please help. thanks


[s]Autoit[/s]

Share this post


Link to post
Share on other sites



That is an <input type=file> element. Security restrinctions prevent it from being scriptable in the way other form elements are (and it fails silently when you try).

See this post for a way to work around this issue.

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

That is an <input type=file> element. Security restrinctions prevent it from being scriptable in the way other form elements are (and it fails silently when you try).

See this post for a way to work around this issue.

Dale

thanks but i also can't find the code for this input box

[s]Autoit[/s]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

That is an <input type=file> element. Security restrinctions prevent it from being scriptable in the way other form elements are (and it fails silently when you try).

See this post for a way to work around this issue.

Dale

Hi Dale

I'm also interested in that issue - I don't need it but for "educational" reason :D

Can you please tell how exactly can be done this workaround?

Your post is to all examples and not to <input type=file>.

Thanks

EDIT: Did you mean SetFocus & Send?

Edited by Zedna

Share this post


Link to post
Share on other sites

EDIT: Did you mean SetFocus & Send?

yes.

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

#7 ·  Posted (edited)

thanks but i also can't find the code for this input box

Vicks, I see your trouble with this page. It turns out that the HTML on the page has a major error in it -- there are two <FORM> tags, but only one closing </FORM> tag. You should notify the owners of the page.

You can therefore not get to the form elements through the form because the DOM is confused. You can get references to the form elements by name (or index) however and do what you want. Here is an example for the emailto field:

$Email = _IEGetObjByName($IE, "emailto")
_IEFormElementSetValue($Email,"vicks@hotmail.com")

Because of this you'll also not be able to use _IEFormSubmit, but you can get a reference to the Submit button in the same way and then use _IEAction with a "click" parameter.

You'll still need to use the SetFocus and Send workaround for the input type=file field.

Dale

Edited 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

Share this post


Link to post
Share on other sites

Vicks, I see your trouble with this page. It turns out that the HTML on the page has a major error in it -- there are two <FORM> tags, but only one closing </FORM> tag. You should notify the owners of the page.

You can therefore not get to the form elements through the form because the DOM is confused. You can get references to the form elements by name (or index) however and do what you want. Here is an example for the emailto field:

$Email = _IEGetObjByName($IE, "emailto")
_IEFormElementSetValue($Email,"vicks@hotmail.com")

Because of this you'll also not be able to use _IEFormSubmit, but you can get a reference to the Submit button in the same way and then use _IEAction with a "click" parameter.

You'll still need to use the SetFocus and Send workaround for the input type=file field.

Dale

thanks ill try and get it working if not there are plenty more upload sites

[s]Autoit[/s]

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