• 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: Passing a Applescript Result to a FileMaker9 Variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing a Applescript Result to a FileMaker9 Variable


  • Subject: Re: Passing a Applescript Result to a FileMaker9 Variable
  • From: Tim Mansour <email@hidden>
  • Date: Thu, 09 Oct 2008 16:24:50 -0700

On Thursday, October 09, 2008, at 01:22PM, "Don Wieland" <email@hidden> wrote:

>I want to use a Perform Applescript [] script step in FMP9 and have
>the results spit into a FMP9 Variable.

FileMaker variables are not exposed in AppleScript, so you need to set a field with your AS result. I find using a global field is easier, and I typically have a global field called "Result" in a table called "System" so I'll use that in my example

You haven't said if your AS is running within FileMaker (eg, using a Perform AppleScript step) but I'll assume it is. Also, the result you specified is in the form of a Finder path:

> folder "Hello World!" of folder "Desktop" of folder "DWDC" of folder "Users" of startup disk of application "Finder"

... whereas I'm assuming that if you want to make use of this within FileMaker it would make more sense to store it as a HFS (or even POSIX) path:

> Macintosh HD:Users:tim:Desktop:Hello World!:

So with all that in mind, try something like this:

tell application "Finder"
  set theFolderName to "Hello World!"
  try
    set theResult to (make new folder in desktop with properties {name:theFolderName}) as string
  on error errM number errN
    set theResult to "ERROR " & errN & ": " & errM
end tell

set cell "Result" of table "System" to theResult

--
Tim Mansour


 _______________________________________________
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: Passing a Applescript Result to a FileMaker9 Variable
      • From: Tim Mansour <email@hidden>
  • Prev by Date: Re: AppleScript broken in 10.5.4
  • Next by Date: Re: Passing a Applescript Result to a FileMaker9 Variable
  • Previous by thread: Passing a Applescript Result to a FileMaker9 Variable
  • Next by thread: Re: Passing a Applescript Result to a FileMaker9 Variable
  • Index(es):
    • Date
    • Thread