Jump to content

Need help in copying a value from a field on a window's screen


Go to solution Solved by Arun-Emmanuel,

Recommended Posts

Hello people,

I am new to AutoIT and need your help in copying a value from a field on Pronto's screen (Order No.) to a clip board so that I can reuse this value in the next screen. I also need to display the copied value for debugging purpose. 

Problem statement: Need to copy Order No. from Full Order Entry screen and reuse this Order No. in the Despatch screen by pasting the copied value. Order No. is an autogenerated value which gets generated as soon as I tab off from Cust. Ref field and the focus sets on Sales Person field.

 

image.thumb.png.794bfeb413afcf5ca05fe46ca41bd0ea.png

 

Link to comment
Share on other sites

Posted (edited)

Yes, I tried to use Au3Info.exe and I can see the following info. Do I need to use ControlClick to click on the Order No field and then use Send("{CTRLDOWN}c{CTRLUP}") or Send("^c")?

image.thumb.png.67833da54c688247b86091f2a96ed808.png

 

 

 

Edited by Arun-Emmanuel
Link to comment
Share on other sites

  • Moderators
ControlGetText("[CLASS:PRONTO Application]", "", "Edit5")

 

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators
14 minutes ago, Arun-Emmanuel said:

However, unable to copy this value to the clipboard so that I can reuse this value on the other screen by Send("^v"). 

Did you by any slim chance look at the clipboard functions in the help file?

ClipPut(ControlGetText(etc...))

maybe?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators
Posted (edited)

And when you paste it in notepad you get nothing?  

If you're trying to paste it into another edit box or input box, and it's not showing, it may be due to leading vertical spaces.

If you can paste it in notepad, and it shows... you should be able to tell.  If there are leading or trailing white spaces, you may try

ClipPut(StringStripWS(ControlGetText(...), 3))

 

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Posted (edited)

All good, my script works, thanks @argumentum @SmOke_N.

Now, I have a single large script which creates a sales order  and dispatches a sales order. This script currently runs only ones per user. My intention now is to create a load by running this script in multiple sessions (concurrent/parallelly) to simulate multiple users trying to access Pronto create sales order at a time. 

Edited by Arun-Emmanuel
Link to comment
Share on other sites

  • Moderators
9 minutes ago, argumentum said:

You need your own helpfile 😂

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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