how to empty clipboard contents?
how to empty clipboard contents?
- Subject: how to empty clipboard contents?
- From: Michael Bovee <email@hidden>
- Date: Mon, 22 Mar 2004 16:59:40 -0500
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.
So, how can I talk to the finder about the clipboard? I cant find a
dictionary entry that seems to work with the clipboard...
Here's my script so far:
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"
Select Range "R12C1:R2513C2"
CopyObject Selection
Activate Window "FILENAME.xls"
Paste
Select Range "R1C1"
set ActiveCell to "time_sec"
Select Range "R1C2"
set ActiveCell to "file_x"
Select Range "R1C3"
tell Application "Finder"
empty "clipboard"
end tell
Close Window "03195052.TXT"
Activate Window "FILENAME.xls"
end tell
Thanks,
--Michael
_______________________________________________
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.