• 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: Reco Label Stringer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reco Label Stringer


  • Subject: Re: Reco Label Stringer
  • From: David Simerly <email@hidden>
  • Date: Thu, 25 Apr 2002 11:35:01 -0700
  • Url: http://www.digital-native.com

on 4/24/02 11:04 PM, Andy Wylie at email@hidden wrote:

> set listA to {frog:"froggie", dog:"fido", cat:"kitty", |cane toad|:"dairy

on 4/25/02 1:59 AM, Mr Tea at email@hidden wrote:

> I didn't quite get why 'cane toad' had those neither-forward-nor-back
> slashes around it (what the heck are they called, anyway?).

You need the vertical bars when you want to use AppleScript keywords as a
custom label or variable. For instance, try compiling the following script
fragment which contains both application and language keywords, and you9ll
see compile errors:

set list to {script:"Search & Replace",properties:{on
run:"beginProcess()", on quit:"end process"}, script:"Yahoo!
Connect",properties:{on run:"sendURL()", on quit:"closeBrowser()"}}

But place vertical bars (aka "pipes" in the unix world), around all the
keywords and the same script fragment compiles with no complaints:

set |list| to {{|script|:"Search & Replace", |properties|:{|on
run|:"beginProcess()", |on quit|:"end process"}}, {|script|:"Yahoo!
Connect", |properties|:{|on run|:"sendURL()", |on quit|:"closeBrowser()"}}}
return "Script \"" & |script| of item 2 of |list| & "\" performs the \""
& |on run| of |properties| of item 2 of |list| & "\" handler when the script
launches."

--> Script "Yahoo! Connect" performs the "sendURL()" handler when the
script launches.

So in Andy's original example, the pipes around "cane toad" were necessary
because because AS doesn't normally allow spaces to be used in variable or
label names. HTH.

DS
______________________________________
Digital Native

Your guide through the virtual jungle.
______________________________________

"Life was meant to be lived, and curiosity must be kept alive. One must
never, for whatever reason, turn his back on life." -- Eleanor Roosevelt
_______________________________________________
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:
    • Best lib for large tables?
      • From: Joakim Jardenberg <email@hidden>
  • Prev by Date: ImageReady 2.0
  • Next by Date: Filemaker script.
  • Previous by thread: Re: Reco Label Stringer
  • Next by thread: Best lib for large tables?
  • Index(es):
    • Date
    • Thread