FL!P



   FL!P Weblog



Search this weblog for:


Day Link Icon Thursday, July 2, 2009
Display system version and build number in GeekTool Software (posted at 5:16 PM by Philippe Martin)

If you're a developer or a tester who uses to switch between various versions of Mac OS for testing purposes, you might find handy to get GeekTool to display the system version and build number. Here's how I do it:

echo `/usr/libexec/PlistBuddy -c "Print :ProductUserVisibleVersion" /System/Library/CoreServices/SystemVersion.plist` (`/usr/libexec/PlistBuddy -c "Print :ProductBuildVersion" /System/Library/CoreServices/SystemVersion.plist`)

The result is something like this:

10.5.7 (9J61)

Permanent Link | Comments: 0 | View Comments | Add Comment




Day Link Icon Wednesday, June 17, 2009
AppleScript Tips for GeekTool 3 Software (posted at 7:38 PM by Philippe Martin)

I love GeekTool and I love even more GeekTool 3 that's currently in development.

However it's not feature complete yet and some things you could do with GeekTool 2 (like switching between groups from a menu) aren't implemented in 3 yet. But GeekTool 3 is now scriptable, which allows to do things from the outside that you cannot do yet with GeekTool 3 alone, like displaying/hiding a given geeklet.

The following script shows how I do that:

property geekletId : "E25ED489-C623-481E-91F1-96A2A614A6BF"
property cmd : "uptime"
property theHeight : 20.0
property theWidth :500.0
tell application "GeekTool"
    tell geeklet id geekletId
        if command is "" then
            set command to cmd
            set refresh time to 10
            set height to theHeight
            set width to theWidth
        else
            set command to ""
            set refresh time to 0
            set height to 0.0
            set width to 0.0
        end if
        refresh
    end tell
end tell

Note that changing the height and width of the geeklet is useful only if you gave it a background colour. Also, the command can be set to anything you can enter in GeekTool's command field itself, but if that command contains any double quotes you'll have to escape each of them with a backslash.

The only tricky bit here (unless you're using the fantastic Script Debugger) is to get the geeklet's Id. But here's a way to get a list of every geeklet's id in relation with its command:

tell application "GeekTool"
    set s to ""
    set lsGeeklets to every geeklet
    repeat with aGeeklet in lsGeeklets
        tell aGeeklet as specifier
            set s to s & id & tab & (command as string) & return
        end tell
    end repeat
end tell
tell application "BBEdit"
    activate
    make new text document in front
    set text of window 1 to s
end tell

And finally you can refresh all the geeklets at once with this simple oneliner:

tell application "GeekTools" to refresh all

These scripts can be called from Apple's AppleScript Menu, Keyboard Maestro, and so on.



Permanent Link | Comments: 0 | View Comments | Add Comment



Day Link Icon Thursday, February 28, 2008
DesktopSweeper 1.4b1 Software (posted at 6:27 PM by Philippe Martin)

Now that Unsanity has released the first beta of their Leopard-compatible version of Application Enhancer, I could at last put together the first Leopard-compatible version of my DesktopSweeper (an APE Module that allows to hide—and show again—the Finder's Desktop icons). The first beta of it has been released privately a couple of days ago to testers, and I'm happy to report that so far everything has been working perfectly. So I'm now releasing the same beta to the public.

Here's what's new in this version:

- Compatible with Leopard and Tiger (Panther is no longer supported).
- Installs Application Enhancer 2.5b1.
- Installs (optionally) SmartCrashReports 1.5b2.

Download: DesktopSweeper 1.4b1 (1.7MB)

Installation:

1. Expand the archive;
2. launch the Installer;
3. follow the instructions;
4. log out and back in, or quit (not force-quit) and re-launch the Finder (easy from Activity Monitor):
5. Launch System Preferences, click on Application Enhancer, then on DesktopSweeper to set your preferences.

See the tooltips for quick help, or click on the Information tab for the readme.

Note that if Unsanity's Application Enhancer isn't present, the installer will offer you to install it (it's required). In this case you'll need to enter an admin password (because Application Enhancer goes to /Library/Frameworks and /Library/PreferencesPanes).

Similarly, if SmartCrashReports isn't installed, you'll have the choice to install it or not. It is not required, but in case of a crash caused by DesktopSweeper, it would allow you to send me the crash log from Apple's Crash Reporter. SmartCrashReports must be installed at /Library/InputManagers, so an admin password may be requested from you.

Please let me know if you encounter any problem, difficulty, typo, whatever... or if you don't.



Permanent Link | Comments: 2 | View Comments | Add Comment

Application Enhancer 2.5b1 brings Leopard Compatibility Software (posted at 6:24 PM by Philippe Martin)

If you've been waiting impatiently (as I have) for a Leopard-compatible version of Unsanity's Application Enhancer, then you can rejoice: the wait is over!

A couple of days ago, Unsanity has released the first public beta of Application Enhancer 2.5, along with a beta of most of their Haxies (FontCard, MenuMaster, Silk, FruitMenu, and WindowShadeX). These all are accessible from this article.

Congrats, Unsanity, and thank you!



Permanent Link | Comments: 0 | View Comments | Add Comment










This site managed with Conversant, © Copyright 2010 Macrobyte Resources

Site Managed with Conversant