Tagor Posted July 25, 2010 Share Posted July 25, 2010 I want to upload a file thru Autoit. After I click on the Browse-button it opens the 'Choose File to Upload'-window. For some reason the script doesn't continu after opening the 'Choose File to Upload'-window. It won't paste the contents of the clipboard. #include <GUIConstants.au3> #include <IE.au3> $GUI = GUICreate($protitle, 1024, 800) $object = ObjCreate("Shell.Explorer.2") _IENavigate($object, "http://somesite.com") _IELoadWait($object) $oinput = _IEGetObjByName($object, "userfile") _IEAction($oinput, "click") _IELoadWait($object) Send("{CTRLDOWN}v{CTRLUP}") Does anyone know what's wrong? Link to comment Share on other sites More sharing options...
evilertoaster Posted July 26, 2010 Share Posted July 26, 2010 I don't see a reason to call _IELoadWait at all here... _IENavigate() calls is automatically and it won't have any effect after the click action because the page is already loaded (the script would just continue). ClipGet() will retrieve the clipboard text btw... Maybe try just a sleep(2000) after _IEAction($oinput, "click"), and then a Send(ClipGet()) to see if it does what you'd expect... Link to comment Share on other sites More sharing options...
DaleHohm Posted July 27, 2010 Share Posted July 27, 2010 See the "Automate input type=file" link in my sig. Dale PoojaKrishna 1 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...
Tagor Posted July 28, 2010 Author Share Posted July 28, 2010 I don't see a reason to call _IELoadWait at all here... _IENavigate() calls is automatically and it won't have any effect after the click action because the page is already loaded (the script would just continue). ClipGet() will retrieve the clipboard text btw...Maybe try just a sleep(2000) after _IEAction($oinput, "click"), and then a Send(ClipGet()) to see if it does what you'd expect...That doesn't work either. It just doesn't paste anything. Link to comment Share on other sites More sharing options...
Tagor Posted July 28, 2010 Author Share Posted July 28, 2010 See the "Automate input type=file" link in my sig.DaleThanks, I tried that, but it doesn't work either. What I noticed is that it doesn't recognize the "Choose File to Upload"-window. WinGetPos("Choose File to Upload") returns nothing. The weird thing is that the window-title is the same as Au3Info.exe returns. Any idea what else to try? Link to comment Share on other sites More sharing options...
sl_alagappan Posted February 6, 2015 Share Posted February 6, 2015 I too face the same issue with "Choose File to Upload"- window in IE. Tried many but no luck yet. 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