Arun-Emmanuel Posted March 12 Share Posted March 12 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. Link to comment Share on other sites More sharing options...
argumentum Posted March 12 Share Posted March 12 have you tried Au3Info.exe over the control ? Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Arun-Emmanuel Posted March 12 Author Share Posted March 12 (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 by Arun-Emmanuel Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 12 Moderators Share Posted March 12 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 More sharing options...
Solution Arun-Emmanuel Posted March 12 Author Solution Share Posted March 12 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"). Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 12 Moderators Share Posted March 12 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 More sharing options...
Arun-Emmanuel Posted March 12 Author Share Posted March 12 Hi @SmOke_N, Yes I tried a similar one and thanks for your help. Local $sText = ControlGetText("[CLASS:PRONTO Application]", "", "Edit5") ClipPut($sText) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 12 Moderators Share Posted March 12 (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 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 More sharing options...
argumentum Posted March 12 Share Posted March 12 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. Link to comment Share on other sites More sharing options...
Arun-Emmanuel Posted March 14 Author Share Posted March 14 (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 by Arun-Emmanuel argumentum 1 Link to comment Share on other sites More sharing options...
Arun-Emmanuel Posted March 15 Author Share Posted March 15 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? Link to comment Share on other sites More sharing options...
argumentum Posted March 15 Share Posted March 15 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. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 15 Moderators Share Posted March 15 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. 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