Guest Drache Posted June 10, 2004 Share Posted June 10, 2004 I am trying to copy text of an old mainframe system using ctrl c. I then have to switch to the spreadsheet to paste. Is there a way that autoit can copy the text and store it within an array within the script? Cheers Link to comment Share on other sites More sharing options...
DaLiMan Posted June 10, 2004 Share Posted June 10, 2004 Maybe something like: Global $Copy = Send ("^C") Have not tried it yet... Link to comment Share on other sites More sharing options...
pekster Posted June 10, 2004 Share Posted June 10, 2004 (edited) Is there a way that autoit can copy the text and store it within an array within the script?I don't know what excatally you'll be using an array for, but once you have the text into a variable you can either put that into an array, or parse the value itself so each character goes into an array element, or whatever. This should get you started: Send("^c");send the Ctrl-c to copy current selection to the clipboard $text = ClipGet();get the clipboard text and put it in $text If @error Then;if this occurs, then the clipboard was empty, or invalid (non-text) MsgBox(0, "Error", "Invalid text in the clipboard");let the user know Exit;and then exit EndIf ;otherwise, do something with the $text var here Variable name in my last comment correct to match the rest of the example code Edited June 16, 2004 by pekster [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
Guest Drache Posted June 16, 2004 Share Posted June 16, 2004 Thanks worked a treat 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