• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: a script for saving text from the clipboard to a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: a script for saving text from the clipboard to a file
      • From: Paul Berkowitz <email@hidden>
References: 
 >a script for saving text from the clipboard to a file (From: Diane <email@hidden>)

  • Prev by Date: Re: Converting Unix path to AppleScript path
  • Next by Date: Scripting Mail message redirection
  • Previous by thread: a script for saving text from the clipboard to a file
  • Next by thread: Re: a script for saving text from the clipboard to a file
  • Index(es):
    • Date
    • Thread