문제

I'm making an applet that prompts users to choose from a list, and my list currently has 169 items. When the list is generated, the window extends from the top of the display to the bottom, a bit overwhelming for a user.

I'm wondering if anyone knows of a way to edit the bounds property of the window generated by "choose from list?"

Here's the code I'm using (not including separate code to compile the list and store it in "pkgList"):

set userChoice to (choose from list pkgList with title "Title" with prompt "Choose file:" OK button name "OK" cancel button name "Cancel" without empty selection allowed) as string

I'm very new to AppleScript, so detailed explanations and analogies are much appreciated. :)

도움이 되었습니까?

해결책

You might use CocoaDialog instead:

set l to {"a a", "b"}
set l2 to ""
repeat with i in l
    set l2 to l2 & quoted form of i & " "
end repeat

do shell script "/Applications/CocoaDialog.app/Contents/MacOS/CocoaDialog \\
standard-dropdown --title Title --text Text --items " & l2
set {button, answer} to paragraphs of result
if button is 1 then return
item {answer + 1} of l
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top