• 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: string as key to record
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: string as key to record


  • Subject: Re: string as key to record
  • From: Paul Berkowitz <email@hidden>
  • Date: Thu, 19 Sep 2002 19:24:52 -0700

On 9/19/02 6:43 PM, "Malcolm Fitzgerald" <email@hidden> wrote:

> John's script does not work if varVal is a string. The script sees an
> unquoted string value, expects that to be a variable and complains
> that the variable is undefined. Including the quotes in the
> concatenation fixes it.
>
> set varKey to "a"
> set varVal to "3"
> set varRecord to run script "
> {" & varKey & ":" & "\"" & varVal & "\"" & "}"
> return a of varRecord
>

Sounds good (unless it's real Unicode, as John said later). You've got a few
more concatenations than you need there:


set varKey to "a"
set varVal to "3"
set varRecord to run script "
{" & varKey & ":\"" & varVal & "\"}"
return a of varRecord



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

References: 
 >Re: string as key to record (From: Malcolm Fitzgerald <email@hidden>)

  • Prev by Date: New version of SpamCopSend script for OSX 10.2 Mail...
  • Next by Date: Re: HOW TO TURN ON COMPUTER?
  • Previous by thread: Re: string as key to record
  • Next by thread: Re: string as key to record
  • Index(es):
    • Date
    • Thread