Re: Finding Terminology Conflicts
Re: Finding Terminology Conflicts
- Subject: Re: Finding Terminology Conflicts
- From: "Daniel A. Shockley" <email@hidden>
- Date: Tue, 16 Apr 2002 18:54:50 -0400
Message: 5
Date: Tue, 16 Apr 2002 11:20:07 +1000
To: email@hidden
From: Malcolm Fitzgerald <email@hidden>
Subject: Re: Finding Terminology Conflicts
That's right - the tell block is displayed here because the script is
run from within Filemaker. The code is developed in Smile and then
pasted (without the surrounding tell block) into a FMPro ScriptMaker
step: Send AppleScript(). Filemaker compiles the code and in doing
so, breaks or bends the code. Developing within the tell block alerts
I've noticed that FileMaker often causes problems when you put a full
script in the Perform AppleScript step. I've started writing my
scripts, saving them compiled into the FileMaker Extensions folder,
and then loading and running them from the Perform AppleScript step.
That way, they act somewhat like a FileMaker plugin.
So, I put a script in a FileMaker scripts like this:
property someParameter: "some crazy value"
try
tell application "FileMaker Pro"
-- TELL not really needed, but used for debugging when run
outside FileMaker
set dbName to name of database 1
set fmPath to (path to it) as string -- get
FileMaker's location
end tell
-- now load myScriptPlugin, in FileMaker Extensions
set {od, AppleScript's text item delimiters} to
{AppleScript's text item delimiters, ":"}
if fmPath ends with ":" then
set lastItem to -3
else
set lastItem to -2
end if
set myScriptPluginPath to ((text items 1 through lastItem of
fmPath) as string) & ":FileMaker Extensions:MyScriptPlugin"
set scriptFunction to load script file myScriptPluginPath
tell scriptFunction to doSomethingWithProperties(someParameter)
set AppleScript's text item delimiters to od
on error errMsg number errNum
display dialog errMsg
end try
-- END OF SCRIPT
I find that doing this is something that I know works within a
FileMaker Perform AppleScript command, while other things often have
problems. I really don't trust it, to be honest. I originally didn't
realize that everything acts as if it's within a tell app "FileMaker
Pro" block, although I guess it makes sense. :-)
--
----
Daniel A. Shockley
email@hidden
email@hidden
http://www.danshockley.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.