FileMaker and AppleScript
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