Re: how to empty clipboard contents?
Re: how to empty clipboard contents?
- Subject: Re: how to empty clipboard contents?
- From: Walter Ian Kaye <email@hidden>
- Date: Mon, 22 Mar 2004 14:47:23 -0800
At 04:59p -0500 03/22/2004, Michael Bovee didst inscribe upon an
electronic papyrus:
Hi,
I'm making progress on my very first script, which happens to be for
Excel (recordability definitely saves the day!), but after copying some
data from one Excel file into another, I want to close the first Excel
file. At this point a prompt box in Excel pops up asking if I care
about all the data on the Clipboard. I dont know how to tell excel to
respond to this and clear the box, so instead it just has my script in
a headlock. It seems I could work around this if I could tell the
Finder to empty the clipboard contents, before I have Excel close the
window that I'm finished with.
If you are copying within Excel, you should be able to bypass the clipboard.
I don't know VBA, but in XLM you can do =COPY(source_range,dest_range).
tell application "Microsoft Excel"
Activate
Create New Workbook
Save ActiveWorkbook In "Jaguar:Users:mbovee:Desktop:FILENAME.xls"
OpenText "Jaguar:Users:mbovee:Documents:Science:ThrRS Data:Stopped
flow:040319:03195052.TXT"
This part:
Select Range "R12C1:R2513C2"
CopyObject Selection
Activate Window "FILENAME.xls"
Paste
...should be replaceable with something which transfers the range
contents directly to the destination sheet. If you can't find a VBA
command with the functionality of the XLM COPY() command, then you
should be able to just 'Evaluate' the XLM (aka Excel 4.0 Macro)
command.
Select Range "R1C1"
set ActiveCell to "time_sec"
Select Range "R1C2"
set ActiveCell to "file_x"
Select Range "R1C3"
Close Window "03195052.TXT"
Activate Window "FILENAME.xls"
end tell
-boo
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.