Vicks Posted July 7, 2006 Share Posted July 7, 2006 #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] Link to comment Share on other sites More sharing options...
DaleHohm Posted July 7, 2006 Share Posted July 7, 2006 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 Link to comment Share on other sites More sharing options...
Vicks Posted July 8, 2006 Author Share Posted July 8, 2006 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.Dalethanks but i also can't find the code for this input box [s]Autoit[/s] Link to comment Share on other sites More sharing options...
Zedna Posted July 9, 2006 Share Posted July 9, 2006 (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.DaleHi DaleI'm also interested in that issue - I don't need it but for "educational" reason Can you please tell how exactly can be done this workaround?Your post is to all examples and not to <input type=file>.ThanksEDIT: Did you mean SetFocus & Send? Edited July 9, 2006 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
DaleHohm Posted July 9, 2006 Share Posted July 9, 2006 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 Link to comment Share on other sites More sharing options...
Zedna Posted July 9, 2006 Share Posted July 9, 2006 yes.DaleThanks for this answer and of course for your GREAT IE UDF I like learn some new solutions.Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
DaleHohm Posted July 9, 2006 Share Posted July 9, 2006 (edited) thanks but i also can't find the code for this input boxVicks, 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 July 9, 2006 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...
Vicks Posted July 9, 2006 Author Share Posted July 9, 2006 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. Dalethanks ill try and get it working if not there are plenty more upload sites [s]Autoit[/s] 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