• 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: Write file command in Filemaker
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Write file command in Filemaker


  • Subject: Re: Write file command in Filemaker
  • From: Jim Weisbin <email@hidden>
  • Date: Tue, 3 Oct 2006 11:49:15 -0400

This snippet works for me. It assumes that your text has been copied to the clipboard, but there must be other ways to pass that data along to Applescript. The code is in escaped format as required by Filemaker's "calculated applescript":

"tell application \"Finder\" " & "¶" &
"set theText to  the clipboard as Unicode text " &   "¶" &
" set AppleScript's text item delimiters to (RETURN)" & "¶" &
" set myFile to the (path to current user folder as text) & \"Desktop:textfile.txt\" as text " & "¶" &
" if exists file myFile then "  & "¶"  &
" delete file myFile "  & "¶" &
" end if " & "¶"  &
" open for access file myFile with write permission " & "¶" &
" set theFileRef to result " & "¶"  &
" write theText to theFileRef as string "  &  "¶"  &
" close access theFileRef "  &  "¶"  &
"end tell "

Jim Weisbin
human
138 5th avenue. 3rd floor, nyc, ny 10011
telephone 212 352 0211
facsimile  212 352 0210
<email@hidden>
http://www.humanworldwide.com



 _______________________________________________
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

  • Prev by Date: Re: Write file command in Filemaker
  • Next by Date: Re: run script with parameters
  • Previous by thread: Re: Write file command in FileMaker
  • Next by thread: Rép: Write file command in Filemaker
  • Index(es):
    • Date
    • Thread