Enhanced applet only displays default prompt in choose from list command

If I run the code from Script Debugger, the choose from list prompt displays correctly with the value I assigned. So too if I save it and run it as a standard Apple applet. But if/when I save and run it as an enhanced applet, choose from list only shows the default prompt which is “Please make your selection:”.

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

on run
		choose from list {"The prompt should be “This is a custom prompt:”", "But instead it will be:", "“Please make your selection:”"} with prompt "This is a custom prompt:" with title "Custom Title" cancel button name "Quit" OK button name "Next"
end run

Works fine here…


use AppleScript version "2.4" -- Yosemite (10.10) or later

use scripting additions

on run

choose from list {"The prompt should be “This is a custom prompt:”", "But instead it will be:", "“Please make your selection:”"} with prompt "This is a custom prompt:" with title "Custom Title" cancel button name "Quit" OK button name "Next"

end run

--> Script Debugger 7.0.5 (7A65)

--> Mac OS 10.11.6 (15G22010)

There is an issue in Enhanced Applets. It will be fixed in an upcoming release of Script Debugger.

1 Like

I see it now. It worked from within SD, but not as from the Enhanced Applet.

thanks. Can you give any indication of when that next release might be? Will the fix be mentioned in the release notes? I’m really keen to build my applets in SD to use sparkle for updates but I use that prompt heavily in my applets.

It will be covered in the release notes, but I can’t say when, However, there is a workaround.

The issue stems from the fact that several commands have a with prompt parameter, and some use the code prmt while others use prmp. So the workaround is to cover both bases:

set resultValue to choose from list {1, 2, 3} with title "Title" with prompt "This is the prompt" given «class prmt»:"This is the prompt"
1 Like

We have addressed this problem for the upcoming Script Debugger 7.0.6 maintenance release. You can download a pre-release build here:

http://www.latenightsw.com/archives/beta_for_script_debugger/ScriptDebugger7.0.6-7A68.dmg

1 Like

Awesome, thank you for the quick fix and access to the pre release build.

I’m noticing a couple other issues with enhanced apps in the pre release 7.0.6 build. I’m sorry if this isn’t the best place for discussing your pre release software but wasn’t sure how else to get the feedback to you. At least this way the issues are grouped and you should know what I’m on about.

One issue is that prompts in choose from list that are more than one line aren’t displaying properly. Only the first line seems to be displayed. This issue appears easily reproducible at least it has happened every time with me I think. I’ve only tested it with enhanced applets. The issue doesn’t occur when running it from within Script Debugger – only when running as an independent applet.

The other issue that I still can’t reliably reproduce is with the title of dialogs (display dialog). They always show up when running from within Script Debugger, but with at least one of my applets they nearly always are omitted when running it as an independent applet. Once I ran it for a while and eventually the titles began showing up, but other times I can’t seem to get them to show up. I created a specific test applet to demo the issue but the issue has never occurred with the demo applet. My applet that is reliably affected is a pretty convoluted applet but I’m happy to send you a link to download it or something if you think it would help. The issue occurs when running an enhanced applet independently of SD. I just did some more limited testing with it as a standard Apple applet and the issue did not occur (i.e. it displayed the expected behaviour of showing the title I had specified for the dialog).

They should both be fixed in the next release.

A post was split to a new topic: Enhanced applet stalls on launch