• 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: Setting Variables to List Items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting Variables to List Items


  • Subject: Re: Setting Variables to List Items
  • From: Paul Berkowitz <email@hidden>
  • Date: Wed, 19 Mar 2003 00:22:46 -0800

> Now your snippet lets me think that you want to use the contents of
> the variable *as a script*. My advice above remains true, you would
> say:
>
> set example_string to "walk()-run()-hide()-quit"
> set AppleScript's text item delimiters to "-"
> set all_items to text items 2 through -1 of example_string as list
>
> set theAction to item 1 of all_items
>
> ----------------------
> tell application "Imaginary"
> do script theAction
> end
> ----------------------
>
> Actually I think the script above won't work, I would rather try:
>
> ----------------------
> set theScript to "tell application \"Imaginary\"
> " & theAction & "
> end"
>
> do script theScript
> ----------------------
>

Emmanuel means 'run script', not 'do script' (unless you have a scriptable
script editor like Smile or Script Debugger which include 'do script' in its
dictionary).
_______________________________________________
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: Setting Variables to List Items
      • From: Emmanuel <email@hidden>
References: 
 >Re: Setting Variables to List Items (From: Emmanuel <email@hidden>)

  • Prev by Date: Re: Display Status Window
  • Next by Date: Re: How to get Finder and System Events confused
  • Previous by thread: Re: Setting Variables to List Items
  • Next by thread: Re: Setting Variables to List Items
  • Index(es):
    • Date
    • Thread