bostjan35 Posted March 7, 2019 Posted March 7, 2019 Hey all, So I have a popup, where I need to add an attachment (not email), but it just doesn't work. I tried with this: WinWaitActive("File Upload") Send("C:\file.txt") Send("{ENTER}") but no luck. And this is the part of the form code: <input name="attachments" multiple="" type="file"> Help, pls:)
FrancescoDiMuro Posted March 7, 2019 Posted March 7, 2019 @bostjan35 You could use _IE* functions to set the value of the input box. Just create the IE object, navigate to the webpage, get the collection of the input boxes, and loop through them looking for the name "attachments"; once you found it, set the filename to the .Value property of the input box and you should be done There are a tons of examples both on the Help file and on the Forums Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
bostjan35 Posted March 7, 2019 Author Posted March 7, 2019 Hey, Thanks for swift reply:) Well, I tried this with what little I know, but it says "variable used without being declared". $colTags = _IETagNameGetCollection($oForm, "input") For $oTag In $colTags If $oTag.value = "attachments" Then _IEAction($oTag, "click") EndIf Next WinWaitActive("File Upload") Send("C:\test.txt") Send("{ENTER}") Help :)
Nine Posted March 7, 2019 Posted March 7, 2019 Try accessing the object by name like : Local $oInput = _IEGetObjByName ($oForm, "attachments") For the rest of the code, I don't understand what are your intents. Give a larger part of the DOM, and explain in more details your objectives. Like what kind of window is "File Upload", where does it come from, etc. Invest your time in giving us the appropriate informations so we can help you effectively. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
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