RE: how to use data from choose from list
RE: how to use data from choose from list
- Subject: RE: how to use data from choose from list
- From: "Steve Goodman" <email@hidden>
- Date: Mon, 8 Jul 2002 10:53:15 -0500
- Thread-topic: how to use data from choose from list
your real close.....chose from list returns a list and your trying to compare it to a string.
try this:
if userchoice as text is "Apple" then display dialog "Apple was selected."
Steve Goodman
>
----------
>
From: email@hidden
>
Sent: Monday, July 8, 2002 9:50 AM
>
To: email@hidden
>
Subject: how to use data from choose from list
>
>
This has got to be a no-brainer for someone one this list - - - can someone
>
tell me what I'm doing wrong in my "if" statement. I just want to be able
>
to branch, based on the results of the user clicking in a list. Right now,
>
selecting Apple does nothing.
>
>
>
set theList to {"Apple", "Orange", "Grape"}
>
>
set userChoice to choose from list theList
>
>
display dialog "userChoice = " & userChoice
>
>
if userChoice is "Apple" then
>
display dialog "Apple was selected."
>
end if
_______________________________________________
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.