Hadez Posted May 4, 2010 Share 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 Link to comment Share on other sites More sharing options...
MrMitchell Posted May 4, 2010 Share Posted May 4, 2010 Does _IEFormElementSetValue() work? Link to comment Share on other sites More sharing options...
Hadez Posted May 4, 2010 Author Share Posted May 4, 2010 Nope, tried _IEFormElementSetValue() on its own, and with WinSetState($oHWND, "", @SW_ENABLE) and _IEAction($ofileLocation, "focus"). no luck. Link to comment Share on other sites More sharing options...
Hadez Posted May 5, 2010 Author Share Posted May 5, 2010 Anyone got any ideas or is the send() the only way to do it? Link to comment Share on other sites More sharing options...
MrMitchell Posted May 5, 2010 Share 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. Link to comment Share on other sites More sharing options...
Hadez Posted May 5, 2010 Author Share 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 Link to comment Share on other sites More sharing options...
MrMitchell Posted May 7, 2010 Share 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 Link to comment Share on other sites More sharing options...
Hadez Posted May 7, 2010 Author Share 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 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