• 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
Calling a property by using a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Calling a property by using a string


  • Subject: Calling a property by using a string
  • From: Chris Tangora <email@hidden>
  • Date: Mon, 25 Sep 2006 11:43:34 -0400

Hello...

I am trying to get this to work, and I was hoping to have someone help me figure out the small detail I am missing. The idea is this, take two strings, put them together and have it be the name of a previously declared property. Ideally the end result of the sample script would be "This Worked", not "Great_Test".

property Average_Test : "Please Don't Work"
property Good_Test : "Shouldn't Work"
property Great_Test : "This worked"

set this to "Great"
set test to "_Test"

set thistest to (this & test)

log thistest



The ultimate ending will be used in AppleScript Studio, but it would be nice to have it work in both Studio and non-Studio apps. Does anybody know a way to convert a string to a previously declared variable?

Thanks in advance,


Chris



---

Chris Tangora
Production Services
The Daytona Beach News-Journal
email@hidden
x2593


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Calling a property by using a string
      • From: Philip Aker <email@hidden>
    • Re: Calling a property by using a string
      • From: "Mark J. Reed" <email@hidden>
  • Prev by Date: Re: List MOM, et al.
  • Next by Date: Re: [OT] Of names and babington's
  • Previous by thread: Re: Parsing quoted text
  • Next by thread: Re: Calling a property by using a string
  • Index(es):
    • Date
    • Thread