-
bodyQuiz 1.0 Released
bodyQuiz is a new game I developed in collaboration with Olav Krigolson, a Neuroscientist at U. Vic. It teaches 1st and 2nd year Neuroanatomy students the structures of the brain.

-
MacScripter.net
I’m excited to announce that I have become the new host of the MacScripter.net discussion forum. MacScripter has been a long standing resource for information concerning macOS automation using technologies such as AppleScript, Automator, and JavaScript For Automation.
Ray Barber established the site many many years ago and has grown it to the point where it is today with almost 30,000 members and an archive of 175,000 posts. MacScripter is a core piece of the AppleScript and macOS automation landscape. Links to MacScripter articles appear almost everywhere macOS automation is discussed. This is all a testament to Ray’s vision in creating MacScripter.net and to his support of the site over the years. Ray has decided to step down and I’m really pleased to be able to provide the resources needed to keep MacScripter.net going in the future.
I sense we are at a point where automation of Apple products is seeing a resurgence. The release of Shortcuts in iOS 12 suggests that Apple has become serious about automation on its mobile devices. I feel this change will spur people to look for more opportunities to automate their Macs as well. All of this represents a great opportunity for MacScripter to grow and become relevant to a new audience.
MacScripter will remain more or less as it is. It will continue to be a place to discuss topics related to macOS and iOS automation in a technology and product agnostic environment.
-
Script Debugger 6 Released
I’m pleased to announce the release of Script Debugger 6. This release introduces over 25 new features and embraces modern AppleScript, including AppleScriptObjC. To sweeten the deal, Script Debugger’s price has been reduced by 50%!
Product Information | Free Trial | Release Notes
For those unfamiliar with Script Debugger, it is an integraded development environment focused on AppleScript. This focus allows us to deliver a suite of tools that makes AppleScript development amazingly productive. Features like the dictionary explorer allow you to look directly into any application’s live scripting interface and step wise debugging with the ability to see the state of all your variables make AppleScript usable in a way you’ve never experienced before. Of course, this is just a taste of the things Script Debugger does.
-
Acorn Is Scriptable!
I oscillate between Acorn and Pixelmator on the Mac - its great to have two competent alternatives to Photoshop. Pixelmator is my current fav on the iPad Pro (there’s nothing like using it’s object removal with the Apple Pencil). However, today Acorn has me on the Mac because it is scriptable. Whipped up this little script to generate images for Script Debugger 6 release notes:
use AppleScript version "2.4" -- Yosemite (10.10) or later use scripting additions on downsampleImage(theFile) local destFolderHFSPath tell application "Finder" set destFolderHFSPath to get folder "Web" of desktop as string end tell tell application "Acorn" tell (open theFile) local imageName, imageWidth, imageHeight set {imageName, imageHeight, imageWidth} to {name, height, width} trim -- Create 1x down sampled image web export width (imageWidth * 0.328) height (imageHeight * 0.328) as PNG in file (destFolderHFSPath & imageName & ".png") -- Create 2x down sampled image web export width (imageWidth * 0.65) height (imageHeight * 0.65) as PNG in file (destFolderHFSPath & imageName & "@2x.png") close saving no end tell end tell end downsampleImage on open theFiles repeat with aFile in theFiles downsampleImage(contents of aFile) end repeat end openNo fuss, it just worked.
-
Script Debugger 6 Release Notes (6A162)
Here is an updated version of the Script Debugger 6 (build 6A162) release notes. We are very close to completion and this document quite accurately reflects the new features in Script Debugger 6.
DISCLAIMER: Nothing is final until the software ships and there is always the possibility that a feature may have to be removed or altered in the final product.
1. Code Signing
Script Debugger 6 adopts an always-on approach to code signing. Once you enable code signing for a script by selecting a developer ID, Script Debugger signs your script each time you save it. There is no requirement to go through a special Save or Export operation.

2. Improved Bundled Script Resource Editing
The Script Debugger 6 bundled script resource editor has been expanded. You are now able to edit a bundle ID, copyright string, marketing version string and build number. Script Debugger 6 gives you the option of auto-incrementing build numbers each time a script is saved.
Additionally, you are able to identify a Scripting Definition (SDEF) file from your script’s bundle and to select a developer ID to enable always-on code signing for your script.
You are able to specify a default copyright string which is used when creating new bundled scripts and applications. This default copyright string may contain clipping directives which are expanded at the time a new script document is created.
3. Progress Reporting
AppleScript’s progress reporting properties (introduced in Mac OS X 10.10 Yosemite) are fully supported in Script Debugger 6. When a script begins reporting progress information by setting any of AppleScript’s progress reporting properties Script Debugger 6 responds by adding a progress bar display above the script’s source:

Script Debugger supports both determinate and indeterminate progress reporting.
Note also that progress information is shown in the window title bar and the script’s document tab. You can elect to dismiss the progress display by clicking the ‘x’ button.
4. Open Quickly
The Open Quickly command, which allows you to easily search for and open scripts containing a particular term in the name or the body of the script, has been heavily revised for Script Debugger 6.
4.1 Improved Search Hit Display
The Open Quickly window highlights the portion of the script’s name, description, Finder comment or script source that matches the search term(s) entered.

4.1 Discontiguous Searching
Discontiguous search matches are reported (when a single search term is entered), similar to the way Xcode’s Open Quickly command behaves when looking up identifiers and source file names. When multiple search terms are entered the Open Quickly command looks for each term within the script name, description, finder comment and script source.
For example, if you have a series of scripts containing the same ‘writeToFile’ handler, you can locate these scripts by entering the search terms ‘write’, ‘writeToFile’ or ‘writeFile’.

5. Editor Improvements
5.1 Code Folding
Script Debugger 6 at long last provides code folding where you can collapse block structures and comments within your code to reduce clutter when editing.

5.2 Autocompletion
Improved code completion to include all matching user defined identifiers, commands from target applications and AppleScript Objective-C identifiers.

5.3 AppleScript Objective-C Autocompletion
AppleScriptObjC code completion covers the main Cocoa frameworks, and automatically handles insertion of
current application'swhere required. The insertion can be either in-line, or in the form of automatically generated properties, with the ability to refactor between the two forms.
5.4 Automatic “it’s” Correction
If you type “it’s " in code, it will be changed to “its “. This avoids the new “– Grammar Police” comment being inserted by the compiler in 10.11 (El Capitan).
5.5 Terminology Clash Avoidance
When using interleaved syntax for handlers, parameters will be escaped with pipe characters if they clash with defined terminology.
5.6 Identifier Case Changing
Script Debugger 6 performs each script compilation in a new AppleScript compiler instance. This avoids a long standing problem where it was impossible to change the case of a variable, property, handler or script object once the script had been compiled.
5.7 Dash Support
If you have Dash installed, you can turn on support so that option-clicking on a word will look it up in Dash. See … in Preferences.
5.7 Application, Script Library and Framework Picker
Script Debugger 6 offers new powers for placeholders referring to applications, script libraries and AppleScript Objective-C framework names when existing clippings, text substitutions and command completions. Script Debugger offers a menu of running and favourite applications for application placeholders, a menu of installed script library names for script placeholders and a menu of commonly used framework names for framework placeholders.

6. Debugging Improvements
6.1 Non-Persistent Global Variables
A new Persistent Global Variables command has been added to the Script menu which allows you to determine if the value of global variables and properties persists from one run to the next. Note that when Code Signing is enabled, this setting is forced off to match the behaviour of signed scripts.
6.2 AppleScript Objective-C Value Exploring
Script Debugger’s various explorers now support AppleScript Objective-C object references. Instead of seeing AppleScript Objective-C object references shown as «class ocid» id «data optr00000000F0FB3885FC7F0000», Script Debugger 6 shows you details of the object:

As this screen shot illustrates, you are even able to explore into container objects to examine their contents.
6.3 AppleScript Objective-C Value Viewers
Script Debugger 6’s support for AppleScript Objective-C objects extends to displaying “native” viewers for dates and images.

6.4 Breakpoint Dragging
Breakpoints, which allow you mark specific lines of your script where execution will pause in debugging mode, can now be moved by dragging them within the script’s gutter. Additionally, you can delete a breakpoint by dragging it out of the script’s gutter.
6.5 Popover Breakpoint Editor
Double-clicking on a breakpoint in the script’s gutter allows you to edit a breakpoint in a popover window. You can also summon this popover window using the breakpoint contextual menu or the Edit Breakpoint command in the Script menu.

6.6 Remove All Breakpoints
The Remove All Breakpoints command now confirms with you before removing all your breakpoints to avoid accidental breakpoint removal.
6.7 Remove All Disabled Breakpoints
A new Remove All Disabled Breakpoints command has been added to remove all disabled breakpoints. Like the Remove All Breakpoints command, this new command confirms with you before removing all your disabled breakpoints to avoid accidental breakpoint removal.
6.8 Improved Current Statement Highlighting
Like Script Debugger 5, Script Debugger 6 moves the current text selection to the current statement as you step through code or pause at breakpoints. However, Script Debugger 6 does not select the current statement’s trailing newline. This avoids some visibility problems which occurred for some users with Script Debugger 5 when their current statement highlight color preference was too similar to the system text selection color.
7. AppleEvent Logging Improvements
7.1 Added Close and Clear Buttons
Added a Clear and a Close button to the Event Log bar within the script window.
8. Dictionary Improvements
8.1 Open Application Dictionary
When the PrefChooseAppsUsingChooser expert preference is true, the dictionary chooser presented by Script Debugger when opening dictionaries lists scripting additions and script libraries just as the Script Editor does.
8.2 Better Application Scriptability Detection
Script Debugger 6 improves the way it determines if an application is scriptable. For example, Apple’s Preview application is not recognized as scriptable.
9. Features Removed
9.1 Mac OS X Version Support
Script Debugger 6 supports Mac OS X 10.10 (Yosemite) or later and Mac OS X 10.11 (El Capitan) is recommended.
9.2 Script Debugger Libraries
Script Debugger 5’s library inclusion mechanism is no longer supported in Script Debugger 6. This means that Script Debugger 5’s Libraries pane has been removed along with the
Flatten Scriptcommand found in the Export submenu of the File menu.Script Debugger 6 provides a conversion service that translates Script Debugger 5 references into AppleScript
use scriptstatments. -
Script Debugger 6 Release Notes (6A121)
I’m posting this in-progress document publicly as a bit of an experiment. Given that it has been several years since the release of Script Debugger 5, I hope that the appearance of this information will give people confidence that Script Debugger 6’s release is imminent.
Beta testing of Script Debugger 6 is on going and I will update this post as changes are made to the application.
DISCLAIMER: Nothing is final until the software ships and there is always the possibility that a feature may have to be removed or altered in the final product.
1. Code Signing
Script Debugger 6 adopts an always-on approach to code signing. Once you enable code signing for a script by selecting a developer ID, Script Debugger signs your script each time you save it. There is no requirement to go through a special Save or Export operation.

2. Improved Bundled Script Resource Editing
The Script Debugger 6 bundled script resource editor has been expanded. You are now able to edit a bundle ID, copyright string, marketing version string and build number. Script Debugger 6 gives you the option of auto-incrementing build numbers each time a script is saved.
Additionally, you are able to identify a Scripting Definition (SDEF) file from your script’s bundle and to select a developer ID to enable always-on code signing for your script.
You are able to specify a default copyright string which is used when creating new bundled scripts and applications. This default copyright string may containing clipping directives where are expanded at the time a new script document is created.
3. Progress Reporting
AppleScript’s progress reporting properties (introduced in Mac OS X 10.10 (Yosemite) are fully supported in Script Debugger 6. When a script begins reporting progress information by setting any of AppleScript’s progress reporting properties Script Debugger 6 responds by adding a progress bar display above the script’s source:

Script Debugger supports both determinate and indeterminate progress reporting.
Note also that progress information is shown in the window title bar and the script’s document tab. You can elect to dismiss the progress display by clicking the ‘x’ button.
4. Open Quickly
The Open Quickly command has been heavily revised for Script Debugger 6.
4.1 Improved Search Hit Display
The Open Quickly window highlights the portion of the script’s name, description, Finder comment or script source that matches the search term(s) entered.

4.1 Better Searching
Discontiguous search matches are reported (when a single search term is entered), similar to the way Xcode’s Open Quickly command behaves when looking up identifiers and source file names. When multiple search terms are entered the Open Quickly command looks for each term within the script name, description, finder comment and script source.
For example, if you have a series of scripts containing the same ‘writeToFile’ handler, you can locate these scripts by entering the search terms ‘write’, ‘writeToFile’ or ‘writeFile’.
5. Editor Improvements
5.1 Code Folding
While not yet fully complete, Script Debugger 6 at long last provides code folding where you can collapse block structures and comments within your code to reduce clutter when editing.
5.2 Autocompletion
Improved code completion to include all matching user defined identifiers. Additional improvements to autocompletion are planned to better support AppleScript Objective-C development.
5.3 Identifier Case Changing
Script Debugger 6 performs each script compilation in a new AppleScript compiler instance. This avoids a long standing problem where it was impossible to change the case of a variable, property, handler or script object once the script had been compiled.
5.4 Automatic “it’s” Correction
If you type “it’s " in code, it will be changed to “its “. This avoids the new “– Grammar Police” comment being inserted by the compiler in 10.11 (El Capitan).
5.5 Terminology Class Avoidance
When using interleaved syntax for handlers, parameters will be escaped with pipe characters if they clash with defined terminology.
5.6 Dash Support
If you have Dash installed, you can turn on support so that option-clicking on a word will look it up in Dash. See … in Preferences.
5.7 Application, Script Library and Framework Picker
Script Debugger 6 offers new powers for placeholders referring to applications, script libraries and AppleScript Objective-C framework names when existing clippings, text substitutions and command completions. Script Debugger offers a menu of running and favourite applications for application placeholders, a menu of installed script library names for script placeholders and a menu of commonly used framework names for framework placeholders.

5.8 …more coming
6. Debugging Improvements
6.1 Non-Persistent Global Variables
A new Persistent Global Variables command has been added to the Script menu which allows you to determine if the value of global variables and properties persists from one run to the next. Note that when Code Signing is enabled, this setting is forced off to match the behaviour of signed scripts.
6.2 AppleScript Objective-C Value Exploring
Script Debugger’s various explorers now support AppleScript Objective-C object references. Instead of seeing AppleScript Objective-C object references shown as «class ocid» id «data optr00000000F0FB3885FC7F0000», Script Debugger 6 shows you details of the object:

As this screen shot illustrates, you are even able to explore into container objects to examine their contents.
6.3 AppleScript Objective-C Value Viewers
Script Debugger 6’s support for AppleScript Objective-C objects extends to displaying “native” viewers for dates and images.

6.4 Breakpoint Dragging
You can move breakpoints by dragging them within the script’s gutter. Additionally, you can delete a breakpoint by dragging it out of the script’s gutter.
6.5 Popover Breakpoint Editor
Double-clicking on a breakpoint in the script’s gutter allows you to edit a breakpoint in a popover window. You can also summon this popover window using the breakpoint contextual menu or the Edit Breakpoint command in the Script menu.

6.6 Remove All Breakpoints
The Remove All Breakpoints command now confirms with you before removing all your breakpoints to avoid accidental breakpoint removal.
6.7 Remove All Disabled Breakpoints
A new Remove All Disabled Breakpoints command has been added to remove all disabled breakpoints. Like the Remove All Breakpoints command, this new command confirms with you before removing all your disabled breakpoints to avoid accidental breakpoint removal.
6.8 Improved Current Statement Highlighting
Like Script Debugger 5, Script Debugger 6 moves the current text selection to the current statement as you step through code or pause at breakpoints. However, Script Debugger 6 does not select the current statement’s trailing newline. This avoids some visibility problems which occurred for some users with Script Debugger 5 when their current statement highlight color preference was too similar to the system text selection color.
7. AppleEvent Logging Improvements
7.1 Added Close and Clear Buttons
Added a Clear and a Close button to the Event Log bar within the script window.
8. Dictionary Improvements
8.1 Open Application Dictionary
When the PrefChooseAppsUsingChooser expert preference is true, the dictionary chooser presented by Script Debugger when opening dictionaries lists scripting additions and script libraries just as the Script Editor does.
8.2 Better Application Scriptability Detection
Script Debugger 6 improves the way it determines if an application is scriptable. For example, Apple’s Preview application is not recognized as scriptable.
-
Script Debugger Pricing
A comment appeared on my Script Debugger 20th Anniversary post asking a question that has arisen many times over the years:
I don’t know how many times I’ve downloaded demos of SD over the years, but I’ve never actually jumped the hurdle of that $199 price tag to purchase it. I wouldn’t hesitate to pay $50 or so, and even with AppleScript getting less attention these days, I can’t believe I’m alone. I’m not (just) complaining here, I’m really interested in your thinking in setting such a high price point. It’s hard to believe you wouldn’t have made more money over time if you were willing to target more casual scripters. Did you make a deliberate choice to cater only to the most hardcore and/or professional users, or was it really a profit-maximizing decision based on real market analysis? Or am I missing something? (Of course I understand that you put a lot of work into it and that the scripter universe is a relatively small market overall.)I have resisted answering this type of question publicly because it seems like a no-win for me. Yes, Script Debugger is expensive. Yes, I could have lowered the price but I have not. Am I missing an opportunity - maybe - we’ll never know. I thought I would turn my response to this question into a post so it won’t be overlooked.
I see Script Debugger as a tool that makes professional developers money by saving them a lot of time. Those that really need Script Debugger know it and would pay much more because of this simple equation. In fact, if I had more courage I would raise the price even further.
The problem with the make-it-up-on-volume model is that the market for AppleScript tools (development tools in general) is very small and fragmented. I don’t believe that simply lowering the price by 3/4 on its own would generate 4x+ sales volume because I don’t think 4x+ customers ready to buy at $50 exist. I would have to market more to reach those customers that do exist and that costs. I would have to become involved in justifying and marketing AppleScript (as I once was) to create new customers which costs. Then there are the added costs of supporting a 4x+ user community. And finally, it lowers the perceived value of my software. I have developed many spreadsheets trying to model this over the years.
There is presently a rant raging on the AppleScript User’s mailing list regarding AppleScript’s future. It is clear that for those that have discovered AppleScript and tamed it, it is powerful weapon. However, the days of AppleScript being the only game in town (as it was before Mac OS X) are long gone. Many alternatives exist that better AppleScript in lots of ways. AppleScript remains the best tool for controlling scriptable Mac applications, but its a bear to master – hence the need for Script Debugger. Apple’s moves to improve AppleScrpt in Mavericks and Yosemite are somewhat encouraging. However, any marketing effort I might mount is never going to move the needle on AppleScript’s presence in the automation market place and Apple’s view of it. Apple’s priorities lie elsewhere so I’m not likely to get any cover from them.
As for maximizing profit, no. I’ve made a living over the years from Script Debugger, but its a base-hit at best. It makes enough money to keep me working on it, but not enough for me to retire or even hire any help. I could have earned more money from consulting but I enjoy being an indie developer and accept the financial consequences.
Back in the 1.0 days, we aggressively pursued sales volume. We had a lower price then, and signed up as many sales channels as we could. We purchased ads in MacTech and MacWorld. Our sales volume steadily rose, but our net revenue started to fall.
-
OSAID Leaks Cause Crashes
As a followup to my Getting Yosemite AppleScript Progress Information post I would like to offer this PSA.
There an AppleScript crashing bug that you may encounter when using the
OSAGetProperty()call.If you fail to call
OSADispose()to release the OSAID values you receive fromOSAGetProperty()you have an OSAID leak. If you begin to see difficult to reproduce crashes that look like this then you have an OSAID leak in your application:#0 0x00007fff97a6a827 in CFRelease () #1 0x00000001054fb6b6 in UASMakeIDTable(unsigned long) () #2 0x00000001054fb81b in UASNewID(TUASScript*) () #3 0x00000001054c0f9d in ASGetPropertyLocal(int, unsigned int, AEDesc const*, unsigned int*) () #4 0x00000001054b7aad in AppleScriptComponent () #5 0x00007fff95704b73 in OSAGetProperty ()I filed a Radar bug with Apple over 10 years ago but the issue appears to have gone unresolved. It seems to me that when the available OSAIDs have been exhausted,
OSAGetProperty()(and all other OSA calls) should return some sort of error instead of crashing.UPDATE
If, like me, you wrap your OSAIDs in an Objective-C object, make sure your autorelease pool(s) drain properly. You’re call to
OSADispose()probably happens when your object is dealloced and that may not happen when you expect. -
Script Debugger's 20th Anniversary
While I was distracted with my late wife’s illness, Script Debugger’s 20th anniversary came and went.
Script Debugger 1
Development on Script Debugger 1.0 started in 1993. Version 1.0 was released in late 1994 and was introduced publicly at MacWorld in San Francisco in January 1995. We shared a booth with FrontMost (later renamed FaceSpan) by Software Designs Unlimited.
Here’s how Script Debugger looked back then.


Interestingly, Script Debugger 1 may never have been a product. I was very uncertain about how to market and sell what was really a $129 piece of shareware. BBEdit was the only model of how this could be done by an independent developer. Remember, the Internet was not as it is today. Software was shrink wrapped in boxes containing floppy disks and printed manuals. It took serious cash to produce product. I had 2000 copies made at a cost of CDN$20,000 (1994 $s). The packing boxes filled an entire room in my basement. Software was sold through mail order outlets (MacTech, Apple’s Developer Central, and others) and trade shows like MacWorld and WWDC. The Mac had no presence in computer stores at that time.
I vividly recall standing outside the MacTech booth at WWDC 1995 in San Jose watching people walk up and purchase Script Debugger. I just could’t believe it was actually happening after all the work that had gone into getting those shrink-wrapped packages onto the MacTech shelves. I developed such an appreciation for how things as mundane as a can of soup get onto a store shelf.
Our daughter was born in 1995, and Gerry left her job to work full time with me. We were so naive. We had no idea what we were signing up for.
Script Debugger 2
Script Debugger 2.0 was introduced in 2000, and went on to win the Mac World Eddy for best development tool (we were up against BBEdit that year - I think Rich and the guys promised Gerry a bottle of champaign - I was at home looking after our 4 year old daughter). I was bummed because I later discovered the presenter that year was John de Lancie who played one of my favourite Star Trek Next Generation characters “Q”.

Here’s a little of how Script Debugger 2 looked at the time:


The big advancement in Script Debugger 2 was the object model explorer which let you see an application’s live scripting interface. This was huge at the time, and to this day, sets Script Debugger apart.

After Script Debugger 2 was released, Apple had its near death experience and our business simply stopped (literally went to zero) in the space of 3 weeks.
During the period that followed, we developed an Adobe Illustrator plugin that made Illustrator scriptable from the Mac with AppleScript and from Windows with Visual Basic. Adobe later purchased this code from us and this went on to form the genesis for the scriptability found in Illustrator, PhotoShop and Acrobat (InDesign had its own killer scripting implementation before we arrived on the scene). The product, named ScripZ, was demoed by Sal Soghoian at that year’s MacWorld Jobs led keynote. We were in meetings with Adobe to conclude the sale of the software right behind the black curtain beside the stage as the keynote was taking place - crazy.
Script Debugger 3
In 2002 we released Script Debugger 3.0. Script Debugger 3 had pretty much the same look and feel as 2.0. We went on to be the runner up for that years MacWorld Eddy for best development tool (I think CodeWarrior got it that year).
The big news for Script Debugger 3 was native Mac OS X support and the integration of our JavaScript scripting system into the product.

Script Debugger 4
In 2006, Script Debugger 4.0 was released. Script Debugger 4 became a Cocoa/Objective-C/C++ application (previously it was a THINK Class Library/C++ application) and received a UI overhaul which adopted the Mac OS X look and feel, and introduced concurrent script execution where scripts open in different windows could be debugged at the same time.


Script Debugger 4.5
Then in 2009 we released Script Debugger 4.5. Like Script Debugger 3, this was an evolutionary released which built on Script Debugger 4.
Script Debugger 5
And finally, in 2012 we released Script Debugger 5.0. Yet another UI overhaul. JavaScript was dropped (irony). Tabbed windows were introduced. Yet another rewrite of many internal components to make the product more maintainable and drop legacy Mac OS stuff, much dating back to the Classic Mac OS days.


Along the way there were other products: ScripZ (the Adobe Illustrator scriptability plugin acquired by Adobe), TagOn (an Adobe InDesign plugin for importing QuarkXPress documents), Affrus (A Perl IDE/Debugger) and of course the ill-fated FaceSpan 5. Then there were the freeware items: XML Tools, XSLT Tools, Plist Tools, Record and List Tools, JavaScript OSA and others I cant remember. All in all there have been more than 40 Script Debugger releases (major and maintenance releases).
While I did all the development on Script Debugger, it was not me alone. Gerry was there throughout the ups and downs running the business, executing the marketing and sales plans. She and I worked together in the same office for most of these 20 years. Matt Neuburg has been there throughout producing all our documentation (amazingly taking over from our first tech writer and creating the SD1 manual in 3 weeks!) and serving as my sounding board for so many years. Other lesser known individuals include Frances Hunter (she produced the original Script Debugger 1.0 printed manual), Lorin Rivers doing marketing and Bryan Bell did all the icons starting with Script Debugger 3. Adrian Ruigrok developed much of FaceSpan 5 and went on to work for Apple on some of the cool iThingies we all love today. And of course the invaluable support of other developers like Rich Siegel, Jon Pugh, Stephan Somogyi and many many others.
And finally, there are all the relationships that developed with customers through all these years, many dating back to the initial release of Script Debugger 1 (Shane, Ray, Jon, Chuck).
Wow, 20 years of my life involved in developing Script Debugger. My daughter is 19 now and attending college.
I hope I have all these dates more or less correct.
P.S. Here are some interesting facts:
- The impetus for Script Debugger came from difficulty I experienced trying to automate Claris FileMaker and Claris MacProject Pro using Apple’s Script Editor. Oddly, these two Claris applications were very scriptable at that time.
- Script Debugger 1.0 was developed on a Mac SE/30 with 4MB RAM using Think C
- Script Debugger 1.0 easily fit on 1 800K floppy disk. Script Debugger 5 is a 14MB download.
- Script Debugger was ported from Think C/TCL/C++/Classic Mac OS Toolbox to Symantec C++, then to CodeWarrior, then to Carbon on Mac OS X, then to Cocoa/Objective-C using Project Builder and now Xcode. Along the way, the TCL (Think Class Library) had to be ported to Carbon. Parts of the TCL are still in use in Script Debugger 5 (CFile/CResFile/CDataFile).
- Script Debugger has out lived several of the products used to build it (THINK C, Symantec C++ and CodeWarrior). Only BBEdit continues to flourish.

-
LNSYearView
I’ve always quite liked how GitHub displays a summary of ones activity over the past year.

I have been working on a side project for the last while which needs a view like this so I decided to create my own. I ended up spending a lot of time in the NSCalendar and NSDateComponents classes which I had never used before. Here’s how it turned out:

The code is available here.

-
Script Debugger 5.0 Released
I’m pleased to announce that I have finally completed Script Debugger 5.0. After an extremely long development period, it is finally done and I can take a breath.
-
Blog Reorganization
With the release of Script Debugger 5 I am splitting my blog into two parts. Late Night Software announcements and Script Debugger related postings are available on a new blog hosted at www.latenightsw.com. All of my development and personal postings will remain here.
-
FaceSpan 5 (Mark's Misadventure)
Back in May 2009 I made the difficult decision to abandon FaceSpan 5. This was a wrenching period in my life and it has taken a long time to recover. The failure of this project seriously stressed my relationship with a couple of good friends and cost me a lot of money and time. At last I feel like I have enough distance to begin to talk about what was accomplished and the mistakes I made.
I am a self-funded Indie (lone) developer. I made a number of classic business blunders on the FaceSpan 5 project. I broke the golden rule: never (never!) rewrite a software product. I massively underestimated the effort required to complete the product. I set off without having sufficient resources to complete the project. Because I took so long to complete my work, the market moved on – AppleScript’s importance to the customers I intended to target declined. Some may argue that the market was never really there to provide a return for a product of this complexity. Finally, I didn’t pull the plug soon enough. Hindsight its great.
Not all was lost. Some of the code I developed for FaceSpan 5 found a home in Script Debugger 5.
##A Little History
Many years previously I developed FaceSpan 3 under contract for its owner. As part of that effort I became impressed with FaceSpan’s power and simplicity. FaceSpan 3 was successful, for a development tool, and even received an Apple Design Award at that year’s Worldwide Developers Conference. Sadly, after my involvement with the product ended, FaceSpan fell into disrepair and did not make the leap to Mac OS X. FaceSpan’s developer finally produced FaceSpan 4 which was to little to late and not as successful as hoped for.
I acquired FaceSpan 4 in 2006 and, after a period where I tried to fix the most serious issues with the product, I concluded that FaceSpan 4’s dependance on AppleScript Studio was its core problem. FaceSpan 4 had great integration of a visual UI bilder and coder editor, but lacked a good runtime environment and debugging.
Work on FaceSpan 5 began in 2007 with the aim of freeing FaceSpan from AppleScript Studio and restoring the classic FaceSpan’s attractiveness. By the time I stopped FaceSpan’s development I believe I was well on my way to achieving my aims. Two great Mac developers helped me with the project:
- Adrian Ruigrok, who now works for Apple, developed much of the FaceSpan 5 IDE code.
- Matt Neuburg acted as a sounding board for my ideas and developed the initial FaceSpan 5 documentation.
The project turned out to be too ambitious given my resources. Additionally, FaceSpan revealed a number of AppleScript issues and problems in Apple’s Cocoa Scripting framework which I was ultimately unable to overcome.
##What Is (Was) FaceSpan?
FaceSpan 5 was an integrate tool for building Cocoa applications using AppleScript. Many people saw similarities to Apple’s HyperCard. FaceSpan provided a visual UI builder, an AppleScript editor, an AppleScript debugger and a runtime environment designed to take the best advantage of AppleScript’s strengths and provide a collection services and UI widgets out of which applications can be built. Matt wrote this description of FaceSpan 5 back when the project was active.

The FaceSpan 5 runtime environment wrapped Apple’s Cocoa Frameworks in a sanitized and simplified AppleScript focused programming interface. This allowed one to build fully Cocoa-native applications using AppleScript without having to learn anything about Cocoa. The intent was for Cocoa to be an implementation detail rather than the programming interface.
We’ll never know if the FaceSpan 5 approach was actually better than the AppleScript Studio interface offered by Apple. My hope was that FaceSpan’s approach was actually simpler, and not simply a substitution of one complicated programming interface for another.
Since FaceSpan 5 was abandoned there have been several developments in the area of AppleScript GUI tools. Firstly, Apple transitioned from AppleScript Studio to AppleScriptObjC. Shane Stanley has released his ASObjC Runner which can display progress dialogs. And then there is the long lived Appearance OSAX from 24U Software.
##The Last Build
When I stopped developing FaceSpan 5, a lot of people came out of the woodwork looking for a copy of the software. I was not willing to make the software available at that time, but I am now. I’m doing this now because I think it might be interesting for those of you who were/are curious about what I was working on to get a chance to play with the product.
Keep in mind that this build predates the release of Xcode 4 and there are some interesting similarities. Apple had to be developing parts of Xcode 4 during the same period so its fascinating to me how common ideas arrise in different places.
Before you download the software, please keep the following conditions in mind:
- This is Alpha-Stage software. This means that it is buggy and its not feature or UI complete. Expect it to crash and fail. If you stick to the examples included with the documentation, you should be okay.
- THE FACESPAN SOFTWARE IS PROVIDED AS-IS FOR EVALUATION PURPOSES ONLY. USE AT YOUR OWN RISK.
- PLEASE DO NOT FILE BUG REPORTS. I’m not going to produce another build.
- PLEASE DO NOT ASK ME TO OPEN SOURCE THE PROJECT. This product shares a lot of code with my Script Debugger product and I’m not willing to release the code.
- RTFM. Seriously, you are on your own.
- The software should run on Snow Leopard (10.6) or Lion (10.7). I have no idea if it will work on Mountain Lion (10.8) or beyond.
View Matt Neuburg’s Alpha Documentation.
I have withdrawn the FaceSpab 5 download as Mac OS X 10.9 (Yosemite) broke it - apologies
Have Fun!
-
Script Debugger 4.5.7
I’m pleased to announce the release of Script Debugger 4.5.7. Script Debugger 4.5.7 is a free maintenance release that addresses a series of issues that came to light following the release of Script Debugger 4.5.
Among the changes in the Script Debugger 4.5.7 maintenance release is a fix for crashing bug when opening or creating documents on Mac OS X 10.7 (Lion).
A big thank you to all the folks who downloaded the various Script Debugger 4.5.7 Beta builds. I really appreciate all the great feedback and bug reports I received.
-
Script Debugger 4.5.7b4
I am preparing another Script Debugger 4.5 maintenance release.
UPDATE: Script Debugger 4.5.7 has been released.
As was the case with Script Debugger 4.5.5 and 4.5.6, I am struggling to resolve some stability problems that appeared following the release of Mac OS X 10.6 (Snow Leopard). Resolving these issues has been very difficult as I am not been able to reproduce the crashes on my own systems.
To help me determine if I’ve resolved the stability issues (or at least improved things), please allow Script Debugger to submit ALL crash reports. I know that this may slow you down a little, but it will help me as I work to resolve the stability problems.
##Requirements
- A Script Debugger 4.5 registration number
- Intel or PowerPC Macintosh
- Mac OS X 10.6, 10.5, 10.4
##Download
Script Debugger 4.5.7b4 (12MB)
##Installation
- Quit Script Debugger if it is running
- Mount the ScriptDebugger4.5.7 disk image
- Copy the Script Debugger 4.5 application from the disk image to your Applications folder (or any other place on your disk)
- Restart your Macintosh to ensure all caches are flushed
I recommend keeping your copy of Script Debugger 4.5.6 around in case you need to revert to that build. Note also that this BETA build expires on October 1, 2011.
##Script Debugger 4.5.7b4 Changes
- 15112 [Crash] Script Debugger co-exists with installations of the forthcoming Script Debugger 5.0.
- 15101 [Crash] Script Debugger no longer crashes when creating new documents on Lion (Mac OS X 10.7).
##Script Debugger 4.5.7b3 Changes
- 15108 Addressed a problem where the Dictionary/Explorer control in the Dictionary window was not updated to ‘Dictionary’ following a search.
- 14862 Added support for ASObjC scripts by allowing ‘class “ClassName”’ constructs to compile.
-
Script Debugger 4.5.7b2
I am preparing another Script Debugger 4.5 maintenance release.
UPDATE: Script Debugger 4.5.7 has been released.
As was the case with Script Debugger 4.5.5 and 4.5.6, I am struggling to resolve some stability problems that appeared following the release of Mac OS X 10.6 (Snow Leopard). Resolving these issues has been very difficult as I am not been able to reproduce the crashes on my own systems. The Script Debugger 4.5.7b2 build addresses some additional problems that I hope will further improve stability.
To help me determine if I’ve resolved the stability issues (or at least improved things), please allow Script Debugger to submit ALL crash reports. I know that this may slow you down a little, but it will help me as I work to finally resolve the stability problems.
##Requirements
- A Script Debugger 4.5 registration number
- Intel or PowerPC Macintosh
- Mac OS X 10.6, 10.5, 10.4
##Download
Script Debugger 4.5.7b2 (12MB)
##Installation
- Quit Script Debugger if it is running
- Mount the ScriptDebugger4.5.7 disk image
- Copy the Script Debugger 4.5 application from the disk image to your Applications folder (or any other place on your disk)
- Restart your Macintosh to ensure all caches are flushed
I recommend keeping your copy of Script Debugger 4.5.6 around in case you need to revert to that build. Note also that this BETA build expires on July 1, 2011.
##Script Debugger 4.5.7b2 Changes
- 15107 Script Debugger no longer attempts to compile scripts when saving changes to an existing Text (.applescript) document.
- 15106 Script Debugger no longer causes AppleScript to convert “reference” to “specifier” when compiling scripts.
- 14862 Added support for ASObjC scripts by allowing ‘class “ClassName”’ constructs to compile.
-
Script Debugger 4.5.7b1
I am preparing another Script Debugger 4.5 maintenance release.
UPDATE: Script Debugger 4.5.7 has been released.
As was the case with Script Debugger 4.5.5 and 4.5.6, I am struggling to resolve some stability problems that appeared following the release of Mac OS X 10.6 (Snow Leopard). Resolving these issues has been very difficult as I am not been able to reproduce the crashes on my own systems. The Script Debugger 4.5.7b1 build addresses some additional problems that I hope will further improve stability.
To help me determine if I’ve resolved the stability issues (or at least improved things), please allow Script Debugger to submit ALL crash reports. I know that this may slow you down a little, but it will help me as I work to finally resolve the stability problems.
##Requirements
- A Script Debugger 4.5 registration number
- Intel or PowerPC Macintosh
- Mac OS X 10.6, 10.5, 10.4
##Download
##Installation
- Quit Script Debugger if it is running
- Mount the ScriptDebugger4.5.7 disk image
- Copy the Script Debugger 4.5 application from the disk image to your Applications folder (or any other place on your disk)
- Restart your Macintosh to ensure all caches are flushed
I recommend keeping your copy of Script Debugger 4.5.6 around in case you need to revert to that build. Note also that this BETA build expires on May 1, 2011.
##Script Debugger 4.5.7b1 Changes
- 15090 [CRASH] Resolved a bug in the Balance command that could result in crashes if compound AppleScript statements (tell x to y, if x then y) appear within a block style comment.
- 15094 [CRASH] Another attempt to resolve the intermittent crashes which began with the release of Mac OS X 10.6 (Snow Leopard).
- 15093 Resolved a problem where the Dictionary window fails to display dictionary descriptions for multiple items selected from the browser.
- 15092 Resolved a problem where application bundles saved as 32-bit appear as PowerPC applications in the Finder.
- 15091 Fixed a typo in the property definition clipping.
-
A Better Text Find & Replace User Interface
I have never been happy with the Text Find & Replace panel in my applications (Script Debugger and Affrus). I started with a version of the Find panel that first appeared in Apple’s Text Edit and many other early Mac OS X applications. Here’s an example from the currently shipping version of Script Debugger 4.5:

The problem here is that the user has to switch their focus away from the text they are editing to the Find & Replace panel. They have to manage the Find panel window by summoning it, closing it, and moving it out of the way if the text they search for lies behind the window.
Then, Xcode came along with its Find & Replace panel integrated directly into the text editor window (similar to how Safari integrated its text search directly into the web browser window):

I came to admire this UI in my day-to-day development and copied it for Affrus 2. However, very quickly my Tech Writer and collaborator Matt Neuburg complained that he didn’t like it because he could not easily see or control the find options (Regular Expressions, Match Words, Ignore Case, etc.). I had a search field popup menu that provided access to these features, but it was not obvious and was clumsy to use. To solve this problem I expanded the inline find panel a little to make these options visible and easily changed. Here’s how this appears in Affrus 2 Alpha:

The problem here is that the inline Find & Replace panel is starting to use up too much valuable vertical space in the window and there are a lot of tightly packed small controls that are difficult to use.
As I was working on a related problem in Script Debugger 5, I came across an idea. Script Debugger 4.5’s dictionary window has a search field in its toolbar. This search field includes a popup menu where the user can control the scope of the search:

This UI was a total failure. The users who were lucky enough to discover these search options found the menu difficult to use as they had to make several trips through the menu to configure the search.
I came across Matt Gemmell’s MAAttachedWindow NSWindow implementation which gave me the idea of placing the search options in a window that only appears when keyboard focus is in the search field:

While I still am not totally happy with the popup window’s appearance and reability, its functionally is dramatically better than the Script Debugger 4.5 approach. The problem of users failing to discover these options totally goes away.
Applying this design to the inline Text Find & Replace, I came up with this:

This design seems to allow one to have a minimalist Find & Replace panel within an editing window while still offering a usable and discoverable range of search options to the user.

-
Script Debugger 5: Dictionary Redesign Prototype
I have been plugging away at a redesign of the Script Debugger 5 dictionary window, and by extension the value viewer that appears throughout the Script Debugger user interface.
The focus of the redesign is to remove the need for multiple windows unless you want them, to simplify navigation between dictionaries and through large dictionaries/object models, and to take better advantage of wide-screen displays. I’ve also tried to modernize Script Debugger’s appearance and make the presentation of dictionary information more consistent.
Rather than say too much more I’ll leave you to check out the screencast and just say that this is a very rough cut at what may or may not appear in Script Debugger 5. All icons are placeholders, etc, etc.
Best viewed full-screen at 720p
I realize that you may not be able to say too much without being able to actually use the software, but I’m very interested in feedback on the changes. In particular, are there obvious omissions/problems? Am I heading in the right direction or is this the wrong thing.
-
Affrus 2.0 Alpha
I’m pleased to announce that the first Affrus 2.0 Alpha build is ready for testing. For those unfamiliar with this software, Affrus 2.0 is an editing and debugging environment that makes Perl and Ruby script development productive by keeping things simple.
In recognition of your patience and invaluable input, Affrus 2.0 Alpha builds are initially available only to our existing Affrus 1.0 customers. In order to join the Affrus 2.0 testing program you will need an Affrus 1.0 registration number and a Macintosh that runs Mac OS X 10.6 or later. Affrus 2.0 presently supports Perl versions 5.8.9 and 5.10.0, as shipped by Apple with Mac OS X 10.6. To join the Affrus 2.0 testing program, send your request, along with your Affrus 1.0 registration number, to support@latenightsw.com.
While I set out on this journey to primarily make Affrus 2.0 compatible with Snow Leopard, I could not resist adding a whole host of new features to really take things up a few notches. Some of these include:
- Fully native Mac OS X user interface
- Many Script Debugger 4.5 derived text editor features
- Split pane editing
- Viewing options
- Editing aids
- Simplified debugger window layout (less wasted space)
- Edit while debugging
- Inline Find/Replace with Regular Expression support
- Debugger Console accepts user input (In Affrus 1.0, the Console could only display script output; in Affrus 2.0 you can type into the Console when a script requests input.)
- Debugger Console can appear in a separate window (frequent Affrus 1.0 feature request)
- Regular Expression Tester window
- Multi-languages including Perl, Ruby, and others in future (frequent Affrus 1.0 feature request)
Keep in mind that this is an Alpha build so while it’s certainly functional, it’s not complete. Expect bugs and missing features. I ask that you decide if you can cope with the inevitable inconveniences that using an Alpha build presents before you download it. You may also notice that certain Affrus 1.0 features are missing. This is temporary. Missing features will be added back as I work towards a Beta version of Affrus 2.0. In exchange for this inconvenience, you get a chance to influence Affrus 2.0 as it nears completion.
I really appreciate the support you’ve all shown during the development of this new version of Affrus. I’ve always been focused on the needs of my fellow developers and strive to make the best tools possible. I believe that Affrus 2.0, when complete, will not disappoint.
-
Script Debugger 4.5.6
UPDATE: I have released Script Debugger 4.5.6 which resolves a license limit exceeded error that effected some users. In all other ways, 4.5.6 is identical to 4.5.5.
I’m pleased to announce the release of Script Debugger 4.5.5. Script Debugger 4.5.5 is a free maintenance release that addresses a series of issues that came to light following the release of Script Debugger 4.5.
This maintenance release attempts to resolve the stability problems that some Script Debugger users have experienced on Snow Leopard. While I have made progress improving stability, there is still more to be done. This maintenance release addresses a number of other important issues so I decided to make these fixes available now rather than hold the release back while I continue resolving the stability problems.
A big thank you to all the folks who downloaded the various Script Debugger 4.5.5 Beta builds. I really appreciate all the great feedback and bug reports I received.
-
Scripting Additions Updated
After an extremely long gestation in Beta I’ve released 64-Bit Intel compatible versions of the following Scripting Additions:
-
Script Debugger 4.5.5b6
UPDATE: Script Debugger 4.5.5 has been released.
I am preparing another Script Debugger 4.5 maintenance release.
I have been struggling to resolve some stability problems ever since the release of Script Debugger 4.5. Resolving these issues has been very difficult as I’ve not been able to reproduce several of the crashes on my own systems. The Script Debugger 4.5.5b3, b4 and b5 releases have resolved several crashes, but some problems remain. The Script Debugger 4.5.5b6 build addresses some additional problems that I hope will further improve stability.
To help me determine if I’ve resolved the stability issues (or at least improved things), please allow Script Debugger to submit ALL crash reports. I know that this may slow you down a little, but it will help me as I work to finally resolve the stability problems.
##Requirements
- A Script Debugger 4.5 registration number
- Intel or PowerPC Macintosh
- Mac OS X 10.6, 10.5, 10.4
##Download
Script Debugger 4.5.5b6 (11.4MB)
##Installation
- Quit Script Debugger if it is running
- Mount the SD4.5.5 disk image
- Copy the Script Debugger 4.5 application from the disk image to your Applications folder (or any other place on your disk)
- Restart your Macintosh to ensure all caches are flushed
I recommend keeping your copy of Script Debugger 4.5.4 around in case you need to revert to that build. Note also that this BETA build expires on September 1, 2010.
##Script Debugger 4.5.5b6 Changes
- 14907 [Crash] Improved the Explorer to protect against some more instances where the UI thread may be accessing data while background threads are altering the data.
- 14927 The Script Debugger 4.0 OSA component is removed if it is still present to avoid the possibility of memory corruptions that might destabilize Script Debugger 4.5.
- 14928 Script Debugger auto-saves documents each time they are compiled. This may slow things down slightly, but it will improve Script Debugger’s ability to recover the contents of open documents in the event of a crash. Previously, Script Debugger auto-saved only before a document was executed.
- 14926 When exporting a Run-Only script over an existing file, Script Debugger ensures that pre-eisting recovery and QuickLook preview data is removed.
- 14925 This change addresses a regression in bug 14881. Script Debugger no longer reports 32-bit scripting addition warnings for StandardAdditions.osax when saving on 32-bit machines as StandardAdditions.osax will always be fully compatible with the host hardware. Script Debugger now only does 32-bit scripting addition checking when running on Mac OS X 10.6 or later.
- 14885 FontSyncScripting.app is no longer mistaken as a Scripting Addition.
-
Script Debugger 4.5.5b5
UPDATE: Script Debugger 4.5.5b6 has been released.
I am preparing another Script Debugger 4.5 maintenance release.
I have been struggling to resolve some stability problems ever since the release of Script Debugger 4.5. Resolving these issues has been very difficult as I’ve not been able to reproduce several of the crashes on my own systems so I’m debugging in the blind. The Script Debugger 4.5.5b3 and b4 releases have resolved several crashes, but some problems remain. The Script Debugger 4.5.5b5 build addresses two additional crashes.
To help me determine if I’ve resolved the stability issues (or at least improved things), please allow Script Debugger to submit ALL crash reports. I know that this may slow you down a little, but it will help me as I work to finally resolve the stability problems.
##Requirements
- A Script Debugger 4.5 registration number
- Intel or PowerPC Macintosh
- Mac OS X 10.6, 10.5, 10.4
##Download
Script Debugger 4.5.5b5 (11.4MB)
##Installation
- Quit Script Debugger if it is running
- IMPORTANT Delete all copies of Script Debugger.component and Script Debugger 4.5.component from your ~/Library/Components folder
- Mount the SD4.5.5 disk image
- Copy the Script Debugger 4.5 application from the disk image to your Applications folder (or any other place on your disk)
- Restart your Macintosh to ensure all caches are flushed
I recommend keeping your copy of Script Debugger 4.5.4 around in case you need to revert to that build. Note also that this BETA build expires on September 1, 2010.
##Script Debugger 4.5.5b5 Changes
- 14907 [Crash] Improved the Explorer to protect against some more instances where the UI thread may be accessing data while background threads are altering the data.
- 14899 [Crash] Resolved a bug that caused Script Debugger to crash when AppleScript reports error text ranges that lie beyond the end of the script. This happens most commonly when you have an unclosed quoted string within a block comment.
-
Script Debugger 4.5.5b4
UPDATE: Script Debugger 4.5.5b5 has been released.
I am preparing another Script Debugger 4.5 maintenance release.
I have been struggling to resolve some stability problems ever since the release of Script Debugger 4.5. The rate of crash reports has diminished significantly with the Script Debugger 4.5.5b3 beta build, but I’m still getting a few crashes. This new beta build contains fixes for a few more instances where AppleScript may be causing crashes.
To help me determine if I’ve actually solved the stability issues (or at least improved things), please allow Script Debugger to submit all crash reports. I know that this may slow you down a little, but it will help us all as I work to finally resolve the stability problems.
##Requirements
- A Script Debugger 4.5 registration number
- Intel or PowerPC Macintosh
- Mac OS X 10.6, 10.5, 10.4
##Download
Script Debugger 4.5.5b4 (11.4MB)
##Installation
- Quit Script Debugger if it is running
- IMPORTANT Delete all copies of Script Debugger.component and Script Debugger 4.5.component from your ~/Library/Components folder
- Mount the SD4.5.5 disk image
- Copy the Script Debugger 4.5 application from the disk image to your Applications folder (or any other place on your disk)
I recommend keeping your copy of Script Debugger 4.5.4 around in case you need to revert to that build. Note also that this BETA build expires on September 1, 2010.
##Script Debugger 4.5.5b4 Changes
- 14898 More changes that attempt to resolve Script Debugger’s stability issues (Please ensure you have deleted all old copies of Script Debugger.component and Script Debugger 4.5.component from your ~/Library/Components folder).
subscribe via RSS

