Jump to content
Sign in to follow this  
Hadez

Alternative to Send() File Location

Recommended Posts

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 :idea:

Share this post


Link to post
Share on other sites

Nope, tried _IEFormElementSetValue() on its own, and with WinSetState($oHWND, "", @SW_ENABLE) and _IEAction($ofileLocation, "focus"). no luck. :idea:

Share this post


Link to post
Share on other sites

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

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 :idea:

Share this post


Link to post
Share on other sites

Shoot I should have read the help file...you are using the suggested work-around! Anyway, good luck...

Edited by MrMitchell

Share this post


Link to post
Share on other sites

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 :idea:

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...