[ANN]Script Helper App

I’ve just released a new version of ASObjC Runner. It lets you run AppleScriptObjC code in your scripts, but the new version also has an extensive standard scripting dictionary. The idea is that you can use it as a faceless scripting helper application. The commands are focused on areas where AppleScript comes up short.

It requires OS X 10.6 or later, and it’s free. You can read about it and download it here:

www.macosxautomation.com/applescript/apps/runner.html
and

www.macosxautomation.com/applescript/apps/runner_vanilla.html

The faceless app looks great for non-AppleScriptObjC coders, thanks!!

FYI, version 1.9.2 is now available. Several new goodies, including new ‘mounted volume’ and ‘screen’ classes, a new path parsing command, an even better progress window, improvements to the ‘modify string’ command, and the ability to create zip files, hard links and symlinks. You can update via Check for Updates, or go to the Web page:

www.macosxautomation.com/applescript/apps/runner_vanilla.html

I just implemented the progress bar part of ASObjC Runner to some of my batch file processing scripts and it works perfectly. I’m very impressed. Thanks Shane!

FYI, version 1.9.3 has just been released. It includes a new Records Suite for dealing with records, some extra list modification options, some new screen functionality, and some sorting tweaks.

You can get it here:

www.macosxautomation.com/applescript/apps/runner.html

Documentation to be updated in the next day or so.

Shane;

It’s very generous of you to keep MacScripter updated with your excellent ASObjC Runner application – a tool I’m gradually learning to really appreciate. Thanks for keeping us posted!

Adam

I’m glad you’re finding it useful!

FYI, I have now updated the Web documentation to cover the Record Suite. I suspect some people will be very happy with this:

tell application "ASObjC Runner"
 link values {1, 2, 3} with labels {"theFirst", "theSecond", "theThird"}
 --> {theFirst:1, theThird:3, theSecond:2}
end tell

FYI, 1.9.4 is available. A bug fix for subtracting lists, and a new command for converting records to lists.

Nice to have a legitimate command for converting records to lists (instead of the well-known hack)

FYI, version 1.9.5 is now available. Includes a small XML Suite for XPath queries and XSLT translations, plus a few other goodies. In particular, ‘about file’ now accepts lists of files, and the results can be limited for greater speed. And ‘modify list’ includes a new parameter, ‘replacing nulls with’, which takes a string – it replaces instances of missing value with the supplied string.

It’s available now via Check for Updates, and at the usual Web site shortly.

FYI, v1.9.6 is now available. Just a collection of bug fixes.

Version 1.9.7 is now available. A couple of bug fixes and two new features: a new application property, “mouse location”; and a new command, “click button”, which lets you emulate single, double and right- clicks.

FYI, 1.9.8 is now available from the Web page and via Check for Updates.

  • Fixes bug where app would quit while showing the progress dialog under OS X 10.6.

  • Fixes terminology conflict with matching suffix/matching prefix in ‘enumerate folder’ command.

  • Fixes crash that happened if you passed ‘modify list’ with cols to rows an empty list. Returns an error instead.

  • New paramter to ‘manage file’ command, ‘creating slim alias’, which deletes preview images from the resulting aliases.

  • Other minor fixes.

FYI version 1.9.9 is now available, but only by choosing Check For Updates at this stage.

  • The ‘clean string’, ‘look for’, ‘modify string’ and ‘replace string’ commands now also accepts files (file references, furls or aliases) where they previously only accepted strings. They will attempt to read in the files (UTF8, dropping back to MacRoman if that fails) and treat the results as strings.

  • There is a new command in the Strings Suite, ‘convert string’. This takes a string or list of strings, and converts to dates, integers or reals. It’s like a batch coercion, but (a) with numerical strings you can choose to use the local decimal separator, and (b) with dates you provide a format string for how to parse them.

  • Other minor fixes.

Hopefully it will also solve some lingering problems on 10.6 systems.

Hi Shane!

Two quick questions for you. I am trying to implement your progress bar in a script I’ve been working on for some time now. How do I update progress as my script works it’s way through tasks? Your examples update as they count through 1-10. Is there a way for me to insert some code after each task ie: “progress = 1” to indicate how far the script has progressed?

Also, is there a way to implement your progress bar into a shell script?

Sure you just insert something like:

tell application "ASObjC Runner" to set current value of progress window to n

where n is the value. Or you can update the message as well:

tell application "ASObjC Runner" to set properties of progress window to {detail:"Blah", current value:n}

Not really. Well could by calling osascript to run the required AppleScript code, but it’s a bit circuitous.

Thanks so much Shane!

One more question. When I code it as prescribed, the progress bar advances in-between the actual tasks instead of while they are actually occurring. Is there a way to force the bar to more accurately represent what is occurring within the script?

The only way to make it appear smoother is to call it more often. So if you’re processing 10 documents, you might set its maximum to 100, and have 10 calls incrementing by 1 sprinkled through the code of your task.

Awesome. Thanks!

FYI, version 1.9.10 of ASObjC Runner is now available, via Check for Updates or www.macosxautomation.com/applescript/apps/runner.html.

Barring bug-fixes, this will be the last version to support 32-bit operation. Future versions will be 64-bit only.

Changes since version 1.9.9

  • Runs in either 64-bit or 32-bit mode under OS X 10.6. (v1.9.9 ran only in 32-bit mode under OS X 10.6.).

  • New ‘merge records’ command offers everal ways of merging records.

  • New ‘elapsed time’ property returns the elapsed time (in seconds) since the turn of the century. Designed to be used as a code timer.

  • Fixes crashing bug in ‘modify list’ when ‘sublists’ was wrongly set to true.

  • Fixed a potential crashing bug in ‘modify list’ command when the ‘flattening’ parameter is true. Also added ‘fully flattening’ parameter.

  • The result from ‘split string … with only first’ has changed when the splitting string is not found. In such cases it now returns a list containing a single item, the full string. There is a also a new parameter, ‘only last’, for splitting only on the last occurrence.

  • The ‘replace string’ command also gets ‘only first’ and ‘only last’ parameters.

  • Fixed a crashing bug in the ‘extract from XML’ command. Also modified results and behavior of ‘including output element’ parameter when the query is for an attribute, to make it more useful.

  • The ‘refine list’ command has had it predicate string checking beefed up. It was previously fairly easy to pass an invalid predicate, resulting in the command not returning.

  • The ‘mounted volumes’ command now excludes /home and /net.

  • The ‘about file’ command has had nearly all its 10.8-deprecated Carbon code replaced with Cocoa code.

  • The underlying regular expression code has been updated for when running under OS X 10.7 or later. There should be no difference in behavior.

  • When using the ‘look for’ command with the ‘invert’ parameter set to true, if the pattern matches the full string, the result will be {“”, “”}. The previous version incorrectly returned an empty list.

  • Other bits and pieces of house-keeping and bug fixes.