Arun-Emmanuel Posted March 12, 2024 Posted March 12, 2024 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.
argumentum Posted March 12, 2024 Posted March 12, 2024 have you tried Au3Info.exe over the control ? Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Arun-Emmanuel Posted March 12, 2024 Author Posted March 12, 2024 (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")? Edited March 12, 2024 by Arun-Emmanuel
Moderators SmOke_N Posted March 12, 2024 Moderators Posted March 12, 2024 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.
Solution Arun-Emmanuel Posted March 12, 2024 Author Solution Posted March 12, 2024 Thanks @SmOke_N, it worked as I was able to capture and print it on a message box (as a part of debugging). However, unable to copy this value to the clipboard so that I can reuse this value on the other screen by Send("^v").
Moderators SmOke_N Posted March 12, 2024 Moderators Posted March 12, 2024 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.
Arun-Emmanuel Posted March 12, 2024 Author Posted March 12, 2024 Hi @SmOke_N, Yes I tried a similar one and thanks for your help. Local $sText = ControlGetText("[CLASS:PRONTO Application]", "", "Edit5") ClipPut($sText)
Moderators SmOke_N Posted March 12, 2024 Moderators Posted March 12, 2024 (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 March 12, 2024 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.
argumentum Posted March 12, 2024 Posted March 12, 2024 Do the StringStripWS(). ClipPut() returns 0 if failed. You can also try _ClipBoard_SetData(). Else, see if you have protection software that impede automated copy'n'paste Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Arun-Emmanuel Posted March 14, 2024 Author Posted March 14, 2024 (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 March 14, 2024 by Arun-Emmanuel argumentum 1
Arun-Emmanuel Posted March 15, 2024 Author Posted March 15, 2024 Hello people, My next query is regarding multi threading. Does AutoIt support multi threading meaning can I run a same script parallelly without interrupting each others?
argumentum Posted March 15, 2024 Posted March 15, 2024 look in https://www.autoitscript.com/forum/profile/4574-argumentum/?tab=field_core_pfield_11 for "fork". Try that. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Moderators SmOke_N Posted March 15, 2024 Moderators Posted March 15, 2024 9 minutes ago, argumentum said: look in https://www.autoitscript.com/forum/profile/4574-argumentum/?tab=field_core_pfield_11 for "fork". Try that. You need your own helpfile 😂 argumentum 1 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.
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