i wan to write a simple program to automatically attach the file to the file uploader of a web page. i try some methods, but there are not working. i had tried to set the value attribute of the file input, but this method is not working.
VB.Net
temp.SetAttribute("value", "D:\test.jpg")
i also tried to use the windows api to set the file path to the text box of the pop out windows of the file selector, but i hang at the last time that click the open button. the click function is not working for the button.
VB.Net
Private Const WM_KEYDOWN = &H100
Private Const WM_KEYUP = &H101
Private Const WM_CHAR = &H102
Private Const WM_LBUTTONDOWN = &H201
Private Const WM_LBUTTONUP = &H202
SendMessage(Button, WM_LBUTTONDOWN, 0, 0)
SendMessage(Button, WM_LBUTTONUP, 0, 0)
SendMessage(Button, WM_KEYDOWN, System.Windows.Forms.Keys.Return, 0)
SendMessage(Button, WM_CHAR, System.Windows.Forms.Keys.Return, 0)
SendMessage(Button, WM_KEYUP, System.Windows.Forms.Keys.Return, 0)
any 1 know the way to set the file url to file input?