List Dialog Box Help

Hey,

I have a list that the user has to choose from, its a list of folders on a remote server and as a result it has about 80 folders in it. I was wondering if it is possible to limit the dimensions of the list as in user can scroll through as right now it just gives a long list…

Also is it possible to write the names of all the folders in a mounted volume to a text file or database which updates if any changes are made to the volume (as in folders added/deleted) and then the list can be created from it for the user to chooses from…
This is what i have right now



set tuser to the text returned of (display dialog "Please Enter Your  ID:" default answer "jdoe" default button 2)
set tpass to the text returned of (display dialog "Please Enter Your Passoword:" default answer "password" default button 2 with hidden answer)
set folderStor to {"About 80 items"}
set share to {choose from list folderStor with prompt "Please Pick Your Dest."}

try
	mount volume "smb://server_name/" & share as user name tuser with password tpass
on error
	display dialog "Unable to connect" with icon stop with title "Error" buttons {"Ok"} default button 1
end try

Thanks

Hi,

the list dialog doesn’t provide a scroll function.
However you can do this in AppleScript Studio with a custom scroll view

Of course the list can be populated by a text file.
Reading the paragraphs of the text file results a list.

Note: This cannot work


.
set share to {choose from list folderStor with prompt "Please Pick Your Dest."}
.

after choosing the single element from the list you get this

{{"About 80 items"}}

a list in a list

Choose from list returns always a list even if the user chooses a single element.
You should first check whether the user has pressed “Cancel”
which returns boolean false


.
set share to choose from list folderStor with prompt "Please Pick Your Dest."
if share is false then return
set share to item 1 of share
.