Jump to content

Left Padded New Text Set Into Control


 Share

Recommended Posts

Hello AutoIT Forum,

Please help!

I have 3 fields all are VARCHAR2, two input the data right padded, and the other enter the data left padded. I can not change the field type or how the data is padded. My following script does enter the data into the right padded fields with no problems; however, it does not enter the 10 character numeric data into the left padded field. The script does place me in the correct field to enter the data manually. The same control below passes the data to the respective field by simply changing the id number 21.

Left padded: the cursor is at the end of the field and begins to display from end to left as it is entered.

ControlSetText("PRODUCT COMPANY DETAILS","",21,$array[2])

Is there a flag or control command that would allow me to enter the 10 character numeric data into the left padded field?

Thank you.

Link to comment
Share on other sites

Hello AutoIT Forum,

Please help!

I have 3 fields all are VARCHAR2, two input the data right padded, and the other enter the data left padded. I can not change the field type or how the data is padded. My following script does enter the data into the right padded fields with no problems; however, it does not enter the 10 character numeric data into the left padded field. The script does place me in the correct field to enter the data manually. The same control below passes the data to the respective field by simply changing the id number 21.

Left padded: the cursor is at the end of the field and begins to display from end to left as it is entered.

ControlSetText("PRODUCT COMPANY DETAILS","",21,$array[2])

Is there a flag or control command that would allow me to enter the 10 character numeric data into the left padded field?

Thank you.

Are you talking about fields in a database or controls in a GUI? :P

For an input control, left justification (not sure what "left padded field" means) is a style setting. It's $SS_LEFT in AutoIt, and set at the time you create the control:

$Input1 = GuiCtrlCreateInput("Text", 10, 10, 100, 20, $SS_LEFT)

Does that have anything to do with what you are asking?

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Hello AutoIT Forum,

Please help!

I have 3 fields all are VARCHAR2, two input the data right padded, and the other enter the data left padded. I can not change the field type or how the data is padded. My following script does enter the data into the right padded fields with no problems; however, it does not enter the 10 character numeric data into the left padded field. The script does place me in the correct field to enter the data manually. The same control below passes the data to the respective field by simply changing the id number 21.

Left padded: the cursor is at the end of the field and begins to display from end to left as it is entered.

ControlSetText("PRODUCT COMPANY DETAILS","",21,$array[2])

Is there a flag or control command that would allow me to enter the 10 character numeric data into the left padded field?

Thank you.

Do you mean that when the data is entered in the left padded inputs the numbers come out reversed?
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Hello AutoIT Forum,

Please help!

I have 3 fields all are VARCHAR2, two input the data right padded, and the other enter the data left padded. I can not change the field type or how the data is padded. My following script does enter the data into the right padded fields with no problems; however, it does not enter the 10 character numeric data into the left padded field. The script does place me in the correct field to enter the data manually. The same control below passes the data to the respective field by simply changing the id number 21.

Left padded: the cursor is at the end of the field and begins to display from end to left as it is entered.

ControlSetText("PRODUCT COMPANY DETAILS","",21,$array[2])

Is there a flag or control command that would allow me to enter the 10 character numeric data into the left padded field?

Thank you.

Hi, thank you for your response; added following the script line above mentioned: Send($array[2]). I works.

Thank you.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...