Hadez 0 Posted May 4, 2010 Hi, im currently using the send() to send a file location to a website. Is there a way around using the send function as it sometimes malfunctions if i click somewhere. The code im using at the moment is : WinSetState($oHWND, "", @SW_ENABLE) _IEAction($ofileElement, "focus") Send("D:\Test\Test.txt) I tried to use control send, but as the box is attached to a browse button, it wont send the txt into the box. Anyone got a work around without having to click the browse button and then search for the file? Thanks for your help Share this post Link to post Share on other sites
MrMitchell 16 Posted May 4, 2010 Does _IEFormElementSetValue() work? Share this post Link to post Share on other sites
Hadez 0 Posted May 4, 2010 Nope, tried _IEFormElementSetValue() on its own, and with WinSetState($oHWND, "", @SW_ENABLE) and _IEAction($ofileLocation, "focus"). no luck. Share this post Link to post Share on other sites
Hadez 0 Posted May 5, 2010 Anyone got any ideas or is the send() the only way to do it? Share this post Link to post Share on other sites
MrMitchell 16 Posted May 5, 2010 Would you mind providing the site (if it doesn't require any login of course) where you found this form element? I don't know of one off-hand that I can test with...thanks. Share this post Link to post Share on other sites
Hadez 0 Posted May 5, 2010 its on a site that requires login, but its a pretty standard browse for file, like the one shown on http://www.2shared.com/ where it asks you to browse for file. the html is: <INPUT id=specialboxn type=file size=70 name=file> i want to avoid having to click the browse button and search for the file. I would rather just input the file location in the text box. Thanks for taking a look for me Share this post Link to post Share on other sites
MrMitchell 16 Posted May 7, 2010 (edited) Shoot I should have read the help file...you are using the suggested work-around! Anyway, good luck... Edited May 7, 2010 by MrMitchell Share this post Link to post Share on other sites
Hadez 0 Posted May 7, 2010 lol, damn. Was hoping there was a better way Thanks for looking though mate. I have tried to use Curl instead to send data by commandline, but am having problems with it. The site needs logging into in order to get to the upload page. I can use Curl to log in succesfully, but have no idea how to then tell it to POST the data on the upload page. Guess more googling for me lol Share this post Link to post Share on other sites