Script Debugger 6.0.5 Released

Originally published at: http://latenightsw.com/script-debugger-6-0-5-released/

We are pleased to announce the release of Script Debugger 6.0.5. Script Debugger 6.0.5 is a free maintenance release addressing a series of issues that came to light following the release of Script Debugger 6.0. This maintenance improves Script Debugger compatibility with macOS Sierra (Mac OS X 10.12) and addresses a number of stability and performance issues.

I’m having an issue with this update:

When running a script from the SD script menu, if an alert is displayed, it does not responses immediately. It can take up to 1 second.
If an enhanced alert (from Shane’s Dialog Toolkit) triggers, it’s shown twice and slows down the machine dramatically.

Is it because of this change:

Script that try to use AppleScriptObjC to modify the host’s behavior will have no effect on Script Debugger.

[MacPro 2013, El Capitan 10.11.6]

What format is the script saved as? If it’s a .app, 6.0.5 will launch it as an app. This will obviously be a bit slower, but it should solve the notification problems you reported earlier.

I don’t see that here. Again, what format?

Compiled Script or Compiled Script Bundle (scpt or scptd).
Before the update all scripts with alerts or enhanced alerts behaved normally.

If running an opened script with command-R, nothing weird happens.
It needs to be closed and triggered from SD’s Script Menu.

But maybe you don’t have this issue because you’re on Sierra?

When running the following script from the menu, I get a double-display of the alert.
(Run the script on an empty selection in a SD document.)

tell application id "com.latenightsw.ScriptDebugger6"
	try
		repeat
			set searchString to (selection of front document)
			set {a1, a2} to selection of front document as point
			if character 1 of searchString is in {space, tab, return, "(", "{", "\"", "\\r", "\\n"} then
				set selection of front document to {a1 + 1, a2 - 1}
			else
				exit repeat
			end if
		end repeat
		
		repeat
			set searchString to (selection of front document)
			set {a1, a2} to selection of front document as point
			if character -1 of searchString is in {space, tab, return, "(", "{", "\"", "\\r", "\\n"} then
				set selection of front document to {a1, a2 - 1}
			else
				exit repeat
			end if
		end repeat
		
		if searchString = "" then error
	on error errText number errNum
		display alert "Script Debugger n'a renvoyé aucun texte." message "Votre sélection est vide ou Script Debugger ne trouve pas la sélection." buttons {"Annuler"} cancel button 1
	end try
	
	set the clipboard to searchString as string
	
end tell

I ran this script and did not get this behavior. Worked fine.

Then upgraded and ran again and again it worked fine.

–>Script Debugger 6.0.5 (6A205) on Mac OS 10.11.6 (15G1510)

Thank you Ed.

I’ve found what’s responsible of this weird behavior.
It’s the app I’m using to remotely control my Mac from my iPad pro: Screens 4.

If I run a script directly from the Mac, everything is ok.
If I run the same script from the iPad connected to the Mac via Screens, it behaves as described in my previous post.

The problem seems to be a refreshing issue on the iPad.
Because when launched from the iPad, I can see the alert displaying in a fraction of second on the Mac and 1 or 2 seconds after, it shows on the iPad.

The strangest thing is that this behavior appears only since the update of SD. And if I run the script from FastScripts, there is no problem at all.

What happens if you run it from the AppleScripts menu?

The same as from the new SD menu.

They use the same mechanism, so that makes sense. Sounds like time to log a bug with Screens 4.

I sent a support request yesterday.

Anyway, my thanks goes to you and Ed for helping me to find the problem.

:wink: