jamiejose Posted May 21, 2012 Share Posted May 21, 2012 (edited) Hi, I have a DataGridview and I wanted AutoIt to input data using Control Send. The problem is the inputted strings are limited to one character. For Example, If I wanted to input 5000, controlsend will only key in 5, the three zeros are not inputted.. please help me with this problem..thanks! Edited May 21, 2012 by jamiejose Link to comment Share on other sites More sharing options...
PhoenixXL Posted May 21, 2012 Share Posted May 21, 2012 Please Be More Specific Give us Your Code Or tell the Application name which U want to Send the Message Then it will be more convenient to us to Help U out Regards Phoenix XL My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression. Link to comment Share on other sites More sharing options...
jamiejose Posted May 22, 2012 Author Share Posted May 22, 2012 Ok, I would like to send data in a DataGridView, Let's say I assigned the string "Red" to be added in one of the cells of the gridview. I used ControlSend Function.. here's my Code.. $formName = "window title" $newRate = "Red" ControlSend($formName, "", "[NAME:DataGridView1]", $newRate, $flag) When I run the AutoIT script, instead of writting "Red", it only writes "R".. How can I solve my problem? Link to comment Share on other sites More sharing options...
jamiejose Posted May 22, 2012 Author Share Posted May 22, 2012 Using Send Function gives me better result, but I wanted to use ControlSend since it is more efficient. How can I solve this issue? please help me.. Thanks! Link to comment Share on other sites More sharing options...
PhoenixXL Posted May 22, 2012 Share Posted May 22, 2012 (edited) To Which Application Are U trying to Send the String I will Download The Application and It would be more easier to help n BTW try using ControlSetText and CHeck if that Helps Edited May 22, 2012 by PhoenixXL My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression. Link to comment Share on other sites More sharing options...
jamiejose Posted May 22, 2012 Author Share Posted May 22, 2012 Hi! PhoenixXL I'm using VB.net (Visual Studio 2008).. I've already tried using ControlSetText and it didn't work either.. Link to comment Share on other sites More sharing options...
water Posted May 22, 2012 Share Posted May 22, 2012 What is the value of $flag? 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...
jamiejose Posted May 22, 2012 Author Share Posted May 22, 2012 $flag = 0 Link to comment Share on other sites More sharing options...
water Posted May 22, 2012 Share Posted May 22, 2012 What version of AutoIt do you use? 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...
jamiejose Posted May 22, 2012 Author Share Posted May 22, 2012 I used AutoIt V3. Link to comment Share on other sites More sharing options...
water Posted May 22, 2012 Share Posted May 22, 2012 Yes, but version 3.3.8.1 (the latest) or an older version? 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...
jamiejose Posted May 22, 2012 Author Share Posted May 22, 2012 oops sorry, I used v3.3.6.1 Link to comment Share on other sites More sharing options...
water Posted May 22, 2012 Share Posted May 22, 2012 Could you try to set $flag = 1 so the data is sent raw? 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...
PhoenixXL Posted May 22, 2012 Share Posted May 22, 2012 Also Try with ControlSetText with Flag=1 Maybe Redrawing the Window WOULD hELP My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression. Link to comment Share on other sites More sharing options...
jamiejose Posted May 22, 2012 Author Share Posted May 22, 2012 Hi water, I tried setting $flag = 1 and still I get the same result. Link to comment Share on other sites More sharing options...
water Posted May 22, 2012 Share Posted May 22, 2012 Maybe the send is too fast. Could you please try the following: AutoItSetOption("SendKeyDelay", 100) $formName = "window title" $newRate = "Red" ControlSend($formName, "", "[NAME:DataGridView1]", $newRate, $flag) 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...
jamiejose Posted May 22, 2012 Author Share Posted May 22, 2012 I've set the SendKeyDelay to 100 and still I get the same result..=( Link to comment Share on other sites More sharing options...
jamiejose Posted May 22, 2012 Author Share Posted May 22, 2012 I think, I'll just use the Send Function.. Thanks guyz! 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