set optList to {60, 50, 30, 25, 15, 10, 6}
set theChoice to choose from list optList with prompt “Choose frame rate (fps)” OK button name “Choose” default items {15} without multiple selections allowed
Since I am running this script as a droplet the choose from list dialog that comes up lies in the background and you have to click on the running applescript application on the dock in order to be able to choose from the list. I want to bring it to the front (kinda like tell application “System Events”
activate
end tell )
I want to get rid of the ‘cancel’ button on the choose from list dialog that comes up.
I want it to select the default value if the user hasn’t done anything for a certain amount of time (kind alike ‘giving up after’ in display dialog)
Also, is there any way to easily replace the choose from list box with a slider bar with various options?
perhaps it might be more useful to use a scripting addition? i know the 24u appearance osax is capable of handling all of your problems easily. the only choice you would have to make is to pay the subscription fee or just have reminder boxes keep popping up whenever you use one of their additions.
activate
set optList to {60, 50, 30, 25, 15, 10, 6}
-- etc.
You can’t. If you have to, you can make the user choose something
activate
set optList to {60, 50, 30, 25, 15, 10, 6}
set theChoice to false
repeat
choose from list optList with prompt "Choose frame rate (fps)" default items {15} OK button name "Choose" cancel button name ""
set theChoice to item 1 of result
if theChoice is not false then exit repeat
end repeat
You can’t directly. I tried using timeout statements, but I couldn’t get it to work the way I wanted it to.
Reading through this thread and noticed Only The Snake’s encouragement to use 24U Software’s additions. A reminder that shareware is not freeware. The licensing guide included in the 24U Appearance OSAX 3.0.1 clearly states:
If you are not into learning a bit of Studio, the 36 bucks is pretty inexpensive.
inexpensive though it may be, some people (especially students like me) cannot afford to spend money as freely as they like. if i had the money, i’d buy a license for every shareware product i own. alas, i am not a hilton child :rolleyes:.
on open TheFile
activate
set optList to {60, 50, 30, 25, 15, 10, 6}
set FrameRate to (choose from list optList with prompt "Choose Frame Rate (FPS)" default items {item 3 of optList}) as text
end open
Hmm it seemns kinda silly that display dialog offers the timeout option and the button specification option but choose from list does not, seeing as they basically provide the same functionality.
Did you know that AppleScript Studio is free and probably on your computer. All you need to do is install it with the installer.
Anyway, another idea might be to use ‘display dialog’ first. Ask the users if they would like to choose an item from the list. If it times out then just use the default item.