Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Clipboard 1

Status
Not open for further replies.

kodr

Programmer
Dec 4, 2003
368
Is it possible to add data to the file clipboard from Aspect?

 
I started looking into the sample script that opens Notepad, and pastes the data there. I never considered using the same technique for the file clipboard. Thanks again.

One question, it looks like ALT '=' is used to open the file clipboard, but the following doesn't work:

Code:
	sendkey ALT '='

Any ideas?
 
As best I can tell looking at the help file, it looks like the hex value of the equal key (0x3D) is not defined, so this value can't be sent. What you can do instead is send at Alt-A to open the Data menu, mspause 250 to give just a little pause, and then send a 'F' to select the File Clipboard menu item.

 
Well, I got the File Clipboard approach to work, but it seems that pasting into the File Clipboard is quirky.

I'm trying (for example) to paste several words into a line of the file clipboard, but every space is treated as a break, so it gets it's own line.

Example:

"This is a test message"

Get's pasted into the FC as:

This
is
a
test
message

As it turns out, using Notepad is a better solution for me anyway.

If anyone is interested, here is the code for using the file clipboard (kind of rough looking though.)

Code:
string sTextToCopy

sTextToCopy = "Test"
termkey ALT 'A'           ;open the data menua
for i = 1 upto 8          ;arrow down to the file clipboard
     sendvkey 0x28        ;0x28 down arrow
endfor

sendvkey 0x0d             ;send Enter
strtoclip sTextToCopy       ; Copy string to clipboard.
sendkey ALT 'E'            ; Send ALT-E to open "Edit" menu.
mspause 250                ; Pause to wait for NOTEPAD.
sendkey 'P'                ; Select PASTE to paste string.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top