• 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
FileMaker and AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FileMaker and AppleScript


  • Subject: FileMaker and AppleScript
  • From: Jacco Rens <email@hidden>
  • Date: Tue, 4 Dec 2007 18:57:08 +0100

Hi everyone,

I'm trying to clean-up some data before saving it to an textfile, from within an AppleScript in a FileMaker scriptstep.

The following line poops an error when FileMaker tries to parse it.

set AppleScript's text item delimiters to "“"

The whole script I'm triggering:

global txt
global myScriptItem

tell application "FileMaker Pro Advanced"
set txt to cell "script steps text" of current record of current layout as text
set myScriptItem to cell "ScriptName" of current record of current layout as text
end tell


(* opschonen code knipsel *)
set current_delimiter to AppleScript's text item delimiters

set newTxt to ""
set AppleScript's text item delimiters to "|"
set newTxt to text items of txt
set AppleScript's AppleScript's text item delimiters to " "
set newertxt to text items of newTxt as text

set AppleScript's text item delimiters to "“"
set newTxt to text items of newertxt
set AppleScript's AppleScript's text item delimiters to "'"
set newestTxt to newTxt as text

set AppleScript's text item delimiters to "”"
set newTxt to text items of newestTxt
set AppleScript's AppleScript's text item delimiters to "'"
set lastText to newTxt as text

set AppleScript's text item delimiters to current_delimiter
my WriteScripts(lastText, myScriptItem)
--set the clipboard to lastText as text
--return lastText as text

on WriteScripts(lastText, myScriptItem)
tell application "Finder"
set myPath to (path to desktop folder) & ":scripts:" & myScriptItem & ".txt" as text
set myFile to (open for access file myPath with write permission)
try
set eof myFile to 0
write lastText to myFile
end try
close access myFile
end tell
end WriteScripts


_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: FileMaker and AppleScript
      • From: Tom Robinson <email@hidden>
    • Re: FileMaker and AppleScript
      • From: Tim Mansour <email@hidden>
  • Prev by Date: Re: RGB Color Space In InDesign
  • Next by Date: Re: FileMaker Import Excel Files Question
  • Previous by thread: ColorsyncScripting Match command
  • Next by thread: Re: FileMaker and AppleScript
  • Index(es):
    • Date
    • Thread