• 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: Searching for the equivalent of coercing to type "record"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Searching for the equivalent of coercing to type "record"


  • Subject: Re: Searching for the equivalent of coercing to type "record"
  • From: Paul Skinner <email@hidden>
  • Date: Fri, 7 Mar 2003 16:03:43 -0500

On Friday, March 7, 2003, at 03:26 PM, Steve Cunningham wrote:

----------------------------
run script ("{<<class usrf>>:{\"a\", \"b\"}} as record")
--> {a:"b"}
----------------------------

Emmanuel

Thanks! That's a new one on me. Took me a while to figure out Chevrons
weren't Greater Than and Less Than signs :-)

Sorry to be so clueless, but how am I supposed to get variables into the
\"a\" and \"b\" slots from outside of the script? I tried globals, but
they didn't work.

I can't find out any information on this in the AppleScript Language
Guide or O'Reilly's. Could you point me to a better source?

Thanks

Steve

Prior to the run script construction, they're just text. So...

set tagName to "myTag"
set valuename to "3.1415"
run script ("{+class usrf;:{\"" & tagName & "\", \"" & valuename & "\"}} as record")
--> {|myTag|:"3.1415"}

For reasons I don't care to waste cycles on; this returns the tag in pipes if your tag contains mixed uppercase and lowercase text.

Paul Skinner
_______________________________________________
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.

  • Follow-Ups:
    • Re: Searching for the equivalent of coercing to type "record"
      • From: Jeffrey Mattox <email@hidden>
References: 
 >Re: Searching for the equivalent of coercing to type "record" (From: Steve Cunningham <email@hidden>)

  • Prev by Date: Re: Searching for the equivalent of coercing to type "record"
  • Next by Date: Re: Move message to another mailbox behaves erratically?
  • Previous by thread: Re: Searching for the equivalent of coercing to type "record"
  • Next by thread: Re: Searching for the equivalent of coercing to type "record"
  • Index(es):
    • Date
    • Thread