Jump to content
Sign in to follow this  
jamiejose

Problem with ControlSend in DataGridView

Recommended Posts

jamiejose

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 by jamiejose

Share this post


Link to post
Share on other sites
PhoenixXL

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.

Share this post


Link to post
Share on other sites
jamiejose

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?

Share this post


Link to post
Share on other sites
jamiejose

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!

Share this post


Link to post
Share on other sites
PhoenixXL

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 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.

Share this post


Link to post
Share on other sites
jamiejose

Hi! PhoenixXL

I'm using VB.net (Visual Studio 2008).. I've already tried using ControlSetText and it didn't work either..

Share this post


Link to post
Share on other sites
water

What is the value of $flag?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
jamiejose

$flag = 0

Share this post


Link to post
Share on other sites
water

What version of AutoIt do you use?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
jamiejose

I used AutoIt V3.

Share this post


Link to post
Share on other sites
water

Yes, but version 3.3.8.1 (the latest) or an older version?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
jamiejose

oops sorry, I used v3.3.6.1

Share this post


Link to post
Share on other sites
water
;) Could you try to set $flag = 1 so the data is sent raw?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
PhoenixXL

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.

Share this post


Link to post
Share on other sites
jamiejose

Hi water, I tried setting $flag = 1 and still I get the same result.

Share this post


Link to post
Share on other sites
water

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 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
jamiejose

I've set the SendKeyDelay to 100 and still I get the same result..=(

Share this post


Link to post
Share on other sites
jamiejose

I think, I'll just use the Send Function.. Thanks guyz!

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  

×