Silver Posted February 19, 2012 Share Posted February 19, 2012 (edited) I have a problem with the function ControlSend, here's the code I'm working, I'm trying to interact with a form to pass a value to a file to upload, the form can be found at this address ultrahosting.altervista.org $oIE = _IECreate ("http://ultrahosting.altervista.org/", 0,1) ; Hide the browser window to demonstrate sending text to invisible window _IEAction($oIE, "visible") $oForm = _IEFormGetObjByName($oIE, "uppa") $oInputFile = _IEFormElementGetObjByName($oForm, "miofile") ; Assign input focus to the field and then send the text string $hIE = _IEPropertyGet($oIE, "hwnd") _IEAction($oInputFile, "focus") ControlSend($hIE, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", $orig) _IEFormSubmit ($oForm, 0) Unfortunately, the script does not pass any value to the form, you know tell me why not work? thanks... Edited February 19, 2012 by Silver Link to comment Share on other sites More sharing options...
water Posted February 19, 2012 Share Posted February 19, 2012 (edited) Why don't you use_IEFormElementSetValue? You have a form named "uppa" and want to enter some data into the input field "miofile"? Edited February 19, 2012 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
bogQ Posted February 19, 2012 Share Posted February 19, 2012 because TYPE=FILE element will not work with _IEFormElementSetValue and send dont work anymore because it's read only field TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
water Posted February 19, 2012 Share Posted February 19, 2012 Then I would click on the button next to the file element and enter the file there. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Silver Posted February 20, 2012 Author Share Posted February 20, 2012 and send dont work anymore because it's read only fieldI don't understand Link to comment Share on other sites More sharing options...
water Posted February 20, 2012 Share Posted February 20, 2012 The TYPE=FILE element is read-only. Try to type some data into the field and you'll see what we mean. You have to click on the button to the right, select a file and then this filepath will be displayed in the TYPE=FILE element. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Silver Posted February 20, 2012 Author Share Posted February 20, 2012 ahhh ok now I understand, As you suggest we do? Link to comment Share on other sites More sharing options...
water Posted February 20, 2012 Share Posted February 20, 2012 Use _IELinkClickByText or _IELinkClickByIndex or whatever is needed to click on the button right to the field. Then the file selection dialog opens.There you can select the file you need. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki 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