Re: Display Dialog
Re: Display Dialog
- Subject: Re: Display Dialog
- From: Axel Luttgens <email@hidden>
- Date: Thu, 14 Apr 2005 17:04:23 +0200
Ruby Madraswala wrote:
Thanks Hanaan and Martin for your input.
I do have the choose from list in the script, I was trying to get the prompt and the list in one window. Is this possible with Applescript or with any other plug-ins.
An attempt with the available standard tools:
on chooseProject()
local Projects
-- The various projects and their types
set Projects to {{refnum:103, types:{"FS", "CR"}}, {refnum:299,
types:{"NZ", "HD", "SN"}}}
-- Build the selection list
set ChoiceList to {}
repeat with Project in Projects
set ProjectNumber to refnum of Project
repeat with ProjectType in types of Project
set end of ChoiceList to "" & ProjectNumber & " " & ProjectType
end repeat
end repeat
-- Ask the user
set Choice to choose from list ChoiceList with prompt "Select a
project number/type:" without multiple selections allowed and empty
selection allowed
-- Return false or {number, type}
if Choice is not false then
set Choice to words of item 1 of Choice
set item 1 of Choice to item 1 of Choice as integer
end if
return Choice
end chooseProject
chooseProject()
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden