• 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: multi input form
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multi input form


  • Subject: Re: multi input form
  • From: Doug Adams <email@hidden>
  • Date: Mon, 08 Mar 2010 20:38:46 -0500

I'm sorry. I should have put my money where my mouth is:


property theList : {"First Name: ", "Last Name: ", "City: "} showTheList()

log theList

to showTheList()
set theRez to (choose from list theList OK button name "Edit" cancel button name "Done" with empty selection allowed without multiple selections allowed)
if theRez is false then -- Done; do error checking?
return
else
set theRez to (theRez as text)
if theRez starts with "first" then
set item figIndex(theRez) of theList to ((item figIndex(theRez) of theList) & text returned of (display dialog "First name is:" default answer ""))
else if theRez starts with "last" then
set item figIndex(theRez) of theList to ((item figIndex(theRez) of theList) & text returned of (display dialog "Last name is:" default answer ""))
else -- is City
set item figIndex(theRez) of theList to ((item figIndex(theRez) of theList) & text returned of (display dialog "City is:" default answer ""))
end if
showTheList()
end if

end showTheList


to figIndex(t)
	repeat with i from 1 to (length of theList)
		if item i of theList starts with t then return i
	end repeat
end figIndex


-- Doug _______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Prev by Date: Re: multi input form
  • Next by Date: Re: Trying to open just three items at a time
  • Previous by thread: Re: multi input form
  • Next by thread: Re: multi input form
  • Index(es):
    • Date
    • Thread