Re: Why did I want the index of a list
Re: Why did I want the index of a list
- Subject: Re: Why did I want the index of a list
- From: Robert Kalbaugh <email@hidden>
- Date: Wed, 27 Jun 2001 11:26:28 -0500
on 6/26/01 3:03 PM, Greg Strange at email@hidden wrote:
>
My project is this:
>
>
I am writing a script that will query AppleMods retrieve the names and
>
descriptions of all the AppleMods and allow users to download the source and
>
install them on the user's computer. Hence, the list, hopefully, will be
>
too long to make each button an item (although I do wonder how many buttons
>
you can have on a dialog. I may check that when I get home).
I believe standard AS dialogs can display up to (3), and there is a
limitation on the size of the string for the button to appear readable.
>
I'm only using URL Access Scripting so this is getting tricky. What am I to
>
do when the list does get extensive (where the names of the scripts are
>
longer than 255?)? Has anyone ever had success with the dialogs that you
>
can make in Smile? I can't seem to make them work.
Aren't Smile dialogs displayed from within the *running* Smile app? It would
be a shame to force users to use it.
>
Of course, I am always
>
scripting these things in the wee hours and that usually leads to wee
>
thinking.
>
>
Thanks again for the help.
>
>
Greg Strange
Based on the above and your original message, it appears that your script
would first display a list within the dialog (string limit 255). The user
will type in a choice from the list and then click "get description" which
is where your loop comes in. May I suggest the "choose from list" feature
built into the newer versions of applescript?
set aModList to {"AppleModA", "AppleModB","AppleModC", "Etc.Etc"}
set uChoice to choose from list aModList with prompt "Get " & opt-l
"description for what AppleMod?"
--result {"AppleModB"}
I think that clicking an item in the list and then hitting "OK" is a bit
easier for the user. They wouldn't have to type. Just keep in mind that the
result is returned as list and not string.
Also, I couldn't find in any info in my Applescript Help on character
limitations in lists of this feature. If it is 255 you could try grouping
mods IE: Text handlers, Date handlers, Numeric handlers, etc.
Anyhoot, just offering some thoughts here. I've been to your site and think
its a wonderful idea and could grow into a great resource. It has certainly
helped this budding scripter. Good luck!
-- And if I'm off target with what you're trying to accomplish, then please
accept my apologies. (wee thinking)
bob.kalbaugh