• 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
Getting name from a record in a script object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting name from a record in a script object


  • Subject: Getting name from a record in a script object
  • From: Joseph Weaks <email@hidden>
  • Date: Tue, 24 Jun 2003 01:01:00 -0500

I'm new to objects, and having a hard time figuring this out. Could someone explain the error in my thinking?

property foobar to {foo:"bar"}
get foo of foobar
-- "bar"
run script "get foo of foobar"
-- The variable foobar is not defined.
run script "get foo of my foobar"
-- Can't get foo of foobar
run script "get foo of parent's foobar"
-- Can't get foo of foobar

What I'm ultimately after is the equivalent of:
set theKey to "foo"
set theRecord to "foobar"
run script "get " & theKey & " of " & theRecord

Thanks,
Joe Weaks
_______________________________________________
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.

  • Prev by Date: Re: Applescript, Panther, and X-Code
  • Next by Date: Re: AppleScript Timed Events
  • Previous by thread: "enterkey" keystroke and some more basic questions
  • Next by thread: Re: Getting name from a record in a script object
  • Index(es):
    • Date
    • Thread