Jump to content

Recommended Posts

I wrote a routine that collects data from window by double-clicking a specific address and copying the selection to the clipboard. The cliboard contents then go to an array as a new element.

I need a way to send the selection directly to the array without copying it to the clipboard (to save resources).

$text = WinGetText("[MyWindow]", "") does not work because the window is from a legacy database run in a mainframe.

Here is a sample of my code:

; move and size the window
WinMove("MyWindow", "", Default, Default, 800, 500) MouseClick("", 489, 129, 2)
; Copy the selected text
Send("{CTRLDOWN}{INS}{CTRLUP}")
$XLArrayMyText = (_ClipBoard_GetData())

I would like to get rid of the last two lines and make the selection an array element without copying it into the clipboard.

I have not found this topic in the forum.

Thank you.

Edited by JailDoctor
Link to comment
Share on other sites

It depends on the emulator, but I have never seen one that does not have a Hotkey to capture the screen to text, or a OLE Automation Interface. It should be in the help file.

I don't know what you mean by saving resources, as a screens worth of text uses negligible resources, much less the AI script itself. If the issue is loosing the users clipboard data, you can do something like.

$hClipBackup=clipget()

DoYourThingThatMessesUpClipboard()

clippug($hClipBackup)

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

×
×
  • Create New...