• 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 app property names
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing app property names


  • Subject: Re: Passing app property names
  • From: "Stockly, Ed" <email@hidden>
  • Date: Wed, 05 Aug 2015 19:23:19 +0000
  • Thread-topic: Passing app property names

Hit send too soon, the last two lines show it works.


set recordLabel to "AnyLabel"

set recordValue to "\"Any Value\""

set recordString to "{" & recordLabel & ": " & recordValue & "}"

set recordScript to "set textToRecord to " & recordString & return & "return " & "textToRecord" & return


run script recordScript

set newRecord to the result

set anyLabel of newRecord to "New Value"

return newRecord

 


From: <applescript-users-bounces+ed.stockly=email@hidden> on behalf of Steve Mills <email@hidden>
Date: Wednesday, August 5, 2015 at 11:44 AM
To: AppleScript Digest <email@hidden>
Subject: Re: Passing app property names

On Aug 05, 2015, at 01:30 PM, "Stockly, Ed" <email@hidden> wrote:

Way back when, I had a way to do that using script objects and do script.

In short you would get the text strings you want for the record labels, build them into a script variable, run that variable as a script object, and return the created record. It's clunky, but IIRC you drop it into a handler and put that in a library and it worked every time with a single handler call.
 
Can you explain this in more detail? I tried messing around with "run script" (did you mean that instead of "do script"?).

Sent from iCloud

 _______________________________________________
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: 
 >Re: Passing app property names (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: Passing app property names
  • Next by Date: Re: List of numbers for encoding in Microsoft Word?
  • Previous by thread: Re: Passing app property names
  • Next by thread: Make a cell in Excel display as text
  • Index(es):
    • Date
    • Thread