Re: a script for saving text from the clipboard to a file
Re: a script for saving text from the clipboard to a file
- Subject: Re: a script for saving text from the clipboard to a file
- From: Malcolm Fitzgerald <email@hidden>
- Date: Tue, 28 Mar 2006 13:20:13 +1000
On 28/03/2006, at 12:47 PM, Diane wrote:
I am a newbie trying to make an Applescript to attach to a FileMaker
button. I'm pretty stuck at this point. I have cobbled together a
script that runs in Script Editor but seems unacceptable to FileMaker,
which tells me "Expected end of line, etc. but found identifier." and
will not save my clumsy script (below).
This is your problem:
write clipboard_contents to alias the_path starting at eof
FMP defines WRITE in it's own dictionary and there is a clash because
you are wanting to use Standard Additions write command
You need to use the raw applescript codes for that command.
Standard Additions read/write
-- «event rdwrwrit» -- write
-- «event rdwrread» -- read
«event rdwrwrit» clipboard_contents to alias the_path starting at eof
Also, if the log file already exists on disk and isn't going to be
accessed simultaneously by other users you don't need to open and close
the file, you can simply write to it.
--
set file_name to name of (info for (choose file))
set the_path to "Macintosh HD:Users:circuit:Desktop:March06 ƒ:online
reservations:"
set clipboard_contents to the clipboard
«event rdwrwrit» clipboard_contents to file (the_path & file_name)
starting at eof
--
Malcolm
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden