• 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: Problem with AppleScripting FileMaker
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with AppleScripting FileMaker


  • Subject: Re: Problem with AppleScripting FileMaker
  • From: Deivy Petrescu <email@hidden>
  • Date: Wed, 20 Jun 2018 12:22:20 -0400


> On Jun 20, 2018, at 04:56 , David Crowe <email@hidden> wrote:
>
> I have found that the following code does not work:
>
>
>               tell application "FileMaker Pro" to tell window "Meeting
> Tracker" to tell layout "Temporary Folder Contents"
>                       tell (create new record)
>                               set {cell "thePrefix", cell "theNumber", cell
> "thePartLetter", cell "theRevision", cell "FileName", cell "theRest", cell
> "theExtension", cell "AttachmentType", cell "FileSize", cell "Contributor"}
> to {theprefix, theNumber, thePartLetter, theRevision, theFileName, theRest,
> theExtension, theKind, item i of theFolderSizeList, theContributor}
>                       end tell
>               end tell
>
>
>
> If I replace the innermost line with something like: set cell “thePrefix” to
> “abc”, I still get “Object not found”. Even just: cell “thePrefix” generates
> the error.
>
>
> On the other hand, the following code, which is equivalent, but more
> complicated, works:
>
> tell application "FileMaker Pro" to tell window "Meeting Tracker" to tell
> layout "Temporary Folder Contents"
>       create new record
>       tell last record — this works because FileMaker always creates new
> records at ‘the end'
>               set {cell "thePrefix", cell "theNumber", cell "thePartLetter",
> cell "theRevision", cell "FileName", cell "theRest", cell "theExtension",
> cell "AttachmentType", cell "FileSize", cell "Contributor"} to {"abc", "def",
> "ghi", "jkl", "mno", "pqr", "stu", "vwx", "yz", "012"}
>       end tell
> end tell
>
>
> Am I doing anything wrong? Or is the FileMaker AppleScript implementation
> just broken?
>
> - David Crowe

David,
I’ve never seen such construct, I don’t believe it works, and even if it did
I’d recommend against using it.
—> tell (create new record)

To begin with you are telling something that does not exist yet, namely the new
record, to do something.
Honestly, my gut feeling is it will never work.
In the second script you create the object and then you tell the existing
object to do something.
That would be my approach always, even if the first method works.

Regards.

Deivy Petrescu
email@hidden



 _______________________________________________
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

References: 
 >Problem with AppleScripting FileMaker (From: David Crowe <email@hidden>)

  • Prev by Date: Re: Problem with AppleScripting FileMaker
  • Next by Date: Re: Problem with AppleScripting FileMaker
  • Previous by thread: Re: Problem with AppleScripting FileMaker
  • Next by thread: Re: Problem with AppleScripting FileMaker
  • Index(es):
    • Date
    • Thread