ThisService 2.0.1
Bug fixes
- Fixes a bug where, in some cases, Packed-Up services would not run. (The cause is that, due to the ordering of two adjacent lines of code responsible for producing the new service, the service executable came to carry a really odd naming prefix.) Thanks to Jim DeVona for reporting this.
ThisService 2.0
New features
- Added support for referencing scripts instead of copying them.
- Referencing works by saving both the path and an alias file to the file. Services with referenced scripts can't be redistributed as is.
- Every time a service with a referenced script is called, the alias is resolved and the two paths compared like below.
- If both go to the same file, use that file.
- If either of the paths either is a folder or doesn't exist, use the other file.
- If none of the files exist, show an alert and bail out.
- If both files exist but one is empty, choose the non-empty one.
- Otherwise, pop up an alert and ask directly which one to use. (If cancelled, the service just exits.)
- Added the Pack Up mode, which takes an installed service (currently looks just in ~/Library/Services) and produces a zip archive containing a version of the service that has been tweaked, as far as ThisService knows, to run safely on any other Mac.
- Pack Up resolves services using referenced scripts (see above) by copying in the script.
- Pack Up as far as possible copies the service structure, including any files you put in the Resources folder. This allows you to bundle requirements, if any.
- In order to not steal any existing keyboard shortcuts, any keyboard shortcut is deleted from the Pack Up version.
- Pack Up allows you to bundle an instructions file or to generate a generic instructions file.
- The generic instructions file is filled with the values you enter for Author name, email and web site. (Those fields are prefilled from the 'Me' card in Address Book, and whatever changes you make are remembered in Pack Up mode.)
- Added a Help book.
- Added ThisService service script starting points for AppleScript, Perl, Python (thanks to Peter Hosey) and Ruby. All starting points work as well with UTF-8 as the language and the version of the language shipping with Mac OS X 10.4 allows without relying on external libraries. This avoids hampering portability.
- Added support for automatically checking for updates.
Changes in service generation and running
- Service scripts now run from inside [service]/Contents/Resources, where the script is located if it's not a reference-style service. (Old services ran from /, the root of the Mac OS X system hard drive.)
- Standard (non-AppleScript) service scripts now run with the environment variable
ThisServiceMode set to YES. (There's no reason that this value should change in the future, but if you watch this, please just check if it's set at all instead of for a certain value.) This allows you to assume ThisService's specific behavior (input and output all in UTF-8) without needing to make a special version of your script if it also functions when not used as a service script. AppleScript service scripts can already 'sniff' for ThisService since the process handler is invoked.
- The service is still started upon creation to force service registration; however, it now quits properly.
- The service executable now seems to properly reflect its respective service in the process name in the Activity Monitor and other places.
- Fixed a bug in which the wrong shortcut key setting was written out (mainly for number row keys) and thus didn't work.
Changes in ThisService user experience
- The entire application is now resolution-independent.
- The application window now offers two tabs, one for creating services and one for using Pack Up.
- The shortcut recorder control have been updated to the latest revision.
- The file pickers now show the path of the file contained when anything outside the Choose or Empty buttons is command-clicked.
- Added credits in the about box.
- The "Both" choice for service type is now known as "Filter", since "Both" was non-descript on its own, and since "Filter" is an accepted term for the UNIX pattern that these service scripts uses.
- The shortcut recorder control now checks pre-emptively for collisions against common keys when setting shortcuts.