• 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: Display Dialog
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Display Dialog


  • Subject: RE: Display Dialog
  • From: "Ruby Madraswala" <email@hidden>
  • Date: Thu, 14 Apr 2005 11:50:59 -0400
  • Thread-topic: Display Dialog

Hi Axel

I tried, but I get en error message at types:{"FS" "expected expression, etc. but found unknown token" . Thanks for your help.

Ruby

 -----Original Message-----
From: 	applescript-users-bounces+rubym=email@hidden [mailto:applescript-users-bounces+rubym=email@hidden]  On Behalf Of Axel Luttgens
Sent:	Thursday, April 14, 2005 11:04 AM
To:	AppleScript Users
Subject:	Re: Display Dialog

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


 _______________________________________________
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

  • Follow-Ups:
    • Re: Display Dialog
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Re: Insert text and paste command
  • Next by Date: Re: Insert text and paste command
  • Previous by thread: Re: Display Dialog
  • Next by thread: Re: Display Dialog
  • Index(es):
    • Date
    • Thread