Re: Setting Variables to List Items
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.