Archive for the ‘Proxi’ Category

Proxi can do that too!

Tuesday, May 1st, 2007

I ran across a post on Daring Fireball today which described using a perl script along with ThisService to search Google for selected text and replace that text with a link to first result returned by Google. Very handy, but I wanted to achieve the same functionality using Proxi.

Proxi supports shell script execution, but only as extra values (for now) so that makes it a little trickier. If you don’t care how much trickier, you can skip the rest of this and simply grab the blueprint.

We have to first break down the blueprint into several stages:

  • Put the selected text on the clipboard.
  • Construct a script using the text we’ve selected. Display the query.
  • Execute the script, place the results in the clipboard, paste and display the results.

More specifically:

Stage 0 - A Control-Shift-L Hotkey Monitor trigger starts the ball rolling. It executes two tasks, a Command-C Key Press to initiate a copy, then an AppleScript which waits a short while to allow the clipboard to export after which it asks Proxi to handle an AppleScript trigger named “query stage 1″.

Stage 1 - Is an AppleScript trigger continues the process. This trigger will fire when Proxi is triggered via AppleScript with the correct name. In this case the name it’s looking for is “query stage 1″. The trigger places the contents of the clipboard into a value named “Clipboard” and executes a Screen Message task to display the search term. Next it write our a perl script using the clipboard contents and the Write to File task. Finally, it kicks off the last stage with another AppleScript task named “query stage 2″.

Stage 2 - An AppleScript trigger which matches “query stage 2″. When fired, it executes the perl script we made in Stage 1 and places the results in an extra value named “ScriptResults”. ScriptResults is displayed in a Screen Message task and loaded onto the clipboard using a Load Clipboard task. Finally, Command-V (paste) is simulated to insert the results in place of the selected text.

This is a great little exercise to demonstrate how to construct complex triggers using Proxi. It also demonstrates some of the shortcomings of Proxi that I’d like to address in future revisions. The ability to execute a script as a task and also modify values during task execution would eliminate the need to break this down into three separate triggers. In the meantime, I hope this helped.

The Proxi wiki has a download link as well as additional information on the Insert Link Blueprint.

Proxi v1.3

Thursday, October 19th, 2006

link: Proxi v1.3

Version 1.3 delivers the following additions and improvements:

  • Added Network Monitor trigger.
  • Skype triggers / task now available on Intel based Macs.
  • iChat trigger smarter about generating triggers when Proxi launches, iChat launches or quits, and also when waking from sleep.
  • Fix when copying / moving a file into a directory initially.
  • Speak Message and Sound Play tasks can now be interrupted by pressing ⌘-. or by deleting the task.
  • Removed CallerName value from Skype trigger. RealName already holds this value.
  • Added StatusDescription value to iChat Trigger.
  • Task/trigger popup butons now respond to initial mouse clicks.

Proxi v1.2.1

Monday, July 31st, 2006

link: Proxi v1.2.1

In this maintenance release:

  • Fixed a problem with Copy/Move task not respecting the “Replace existing” setting.
  • Fixed a problem displaying hotkey and key press descriptions correctly on Intel machines using a non US keyboard layout.
  • Fixed a crash that occurs when upgrading Proxi from a PowerPC machine to an Intel machine.
  • Assorted minor corrections.

Stupid GUI Tricks

Monday, July 17th, 2006

Taken directly from the wiki entry:

Who loves Apple’s brushed metal look, raise your hand? OK there are a couple, but there are some others… not so much.

When creating Proxi, we decided to go with the standard brushed metal look with the idea that if Apple changed it we, as we used the standard brushed metal window, would get any changes that Apple made to this look “for free”. There are rumors of such a change underway in Leopard, but who knows. We might have also gone with the new Unified (hardly) look, but it requires the addition of a toolbar at the top of the window (see Mail for an example). We looked at this early on and it looked funny. So there it is, nothing can be done about this right?

Rejoice brushed metal haters, for there is a hidden preference in Proxi to switch to, what I like to call, the Plastic look.

To enable the Plastic look, you can open the Terminal enter the following and relaunch Proxi:

defaults write com.griffintechnology.Proxi guiStyle 1

To switch back to Brushed Metal, enter this in the Terminal and relaunch Proxi:

defaults write com.griffintechnology.Proxi guiStyle 0

Or check out the Style Switcher blueprint.

So why didn’t we build this into the Preferences? It may one day find it’s way in there, but we’re anxious to see what direction Apple heads with Leopard. Perhaps they’ll officially change to some other look and we won’t have to worry about such things.

Is there perhaps another guiStyle you ask? Well yes, the guiStyle can be set to 2 for extreme silliness. You’ll also need to set patternPath to a valid image file. In other words:

defaults write com.griffintechnology.Proxi guiStyle 2
defaults write com.griffintechnology.Proxi patternPath "/A/Path/To/A/Valid/Image"

What the window looks like depends on what sort of pattern you choose, but here’s an example:

Have fun.

Proxi v1.2 released

Monday, July 17th, 2006

link: Proxi v1.2

As promised, Proxi version 1.2 is released today.

See the wiki (or prior post) for additional information.

Proxi Beta v1.2 (2A38)

Thursday, July 13th, 2006

A new beta of Proxi in the works. If you’re updating Proxi using from the beta feed you may have already seen it, if not here’s what you can expect in the new release:

  • Added Apple Remote trigger.
  • Added Spotlight task.
  • Added Copy / Move Files task.
  • Added Sleep Monitor trigger.
  • Added support for enclosures and images to RSS Monitor trigger:
    • Added values: ItemEnclosure (url), ItemImage (image), ItemThumbnail (image)
  • Fixed iTunes Monitor trigger generating a false trigger when changing the track rating.
  • Changed Folder Monitor trigger so that the “filepath” variable contains the full path instead of using ~/.
  • Added ratings to iTunes Control task.
  • Added value to Folder Monitor: Icon (image).
  • Added AppleScript syntax highlighting.
  • Cleaned up AppleScript error reporting.
  • Hotkeys now completely disable when disabled.
  • Almost any key combination can now be used as a hotkey including function keys and ⌘-W.
  • Added Running Apps extra value: A comma separated list of all running applications.
  • Allow all text fields access to Values.
  • Fixed search field colliding with value window button at small widths.

We’ll give this a few days to ferment and if all goes well expect to see a general release Monday.

Digg Monitor v0.2

Thursday, June 29th, 2006

The introduction of digg v3 brought with it the addition of a lot of categories for the stories posted there along with many other features. So it seemed a good time to turn my attention to a better Digg Monitor for Proxi.

Digg Monitor trigger

Digg Monitor v0.2 adds support for monitoring only those categories of news interesting to you. This also makes it easier to assign a different set of tasks to items that fall in one category versus another. The available categories are:

  • All Stories
    • Technology
      • Apple, Design, Gadgets, Hardware, Industry News, Linux / Unix, Mods, Programming, Security, Software, Tech Deals
    • Science
      • Space, Environment, Health, General Sciences
    • World & Business
      • Business & Finance, Politics, World News, Offbeat News
    • Videos
      • Animation, Comedy, Educational, Music, People, Gaming
    • Entertainment
      • Celebrity, Movies, Music, Television
    • Gaming
      • Gaming News, Playable Web Games

In addition to being able to monitor stories dugg by digg users and the friends of digg users, there is now support for monitoring stories submitted or commented on a particular digg user or friends. Where applicable, the Digg Monitor will set the new “Friends” value to a comma separated list of friends that have commented on or dugg a story. And finally, the error reporting has been cleaned up. No longer will a broken feed or internet connection bring up an annoying dialog box. Errors are reported in the settings view and indicated by a caution icon in your trigger list.

Download the Digg Monitor for Prox.
Of course the Digg Monitor requires Proxi for Mac OS X.

For additional information see the Digg Monitor entry in the wiki.

Sample Task

Friday, June 16th, 2006

OK so this was supposed to be done yesterday, but shiny things distracted me as they often do. But here’s part two of the promised example code.

Mailer

Mailer task

This is one of those tasks I would’ve liked to include in the core suite included with Proxi but there are a few lingering questions about it. The MessageFramework, on which this is based, is sparsely documented and I’m not sure Apple’s commitment to it. It also requires that you’ve configured Mail correctly, i.e. you’re not using some other email application. So I was kind of on the fence about this one. Maybe it’ll become part of the core suite in a new release. Maybe not.

Anyway, this task is also pretty straightforward. Gather some info using 2 GValueTextField’s (these are new as of Proxi v1.1 and so they haven’t rippled completely through Proxi yet) and one GValueTextView. Those allow specially formatted text to appear as Value tokens.

The instructions for this task bundle are the same as for the trigger: Grab the source, compile with XCode, throw the bundle in /Library/Application Support/Proxi/PlugIns/ and restart Proxi. If you built it right and I didn’t screw something up, you should see Mailer in your task list.

For more information on creating your own triggers and task, check this article.

Source: mail.zip
Proxipedia: Mailer Task

Sample Trigger

Wednesday, June 14th, 2006

For some time I’ve been meaning to put together a sample Trigger and Task bundle to aid those wanting to create their own specialized components. And lately I’ve had a request for this as well, so I spent a little time today putting together part one of a this two part project.

Stock Quote

Stock Quote trigger

I wanted to do a little bit more than a Hello World, but nothing to complicated that it took away from demonstrating the basic principles. I had portions of this code laying about to grab a stock quote via a SOAP call, so I decided to roll that into a trigger.

This is a pretty basic trigger. It asks for a stock symbol (AAPL is always a good one to test with) and also has a slider to set the update interval.

So, if your curious, grab the source, compile with XCode, throw the bundle in /Library/Application Support/Proxi/PlugIns/ and restart Proxi. If you built it right and I didn’t screw something up, you should see Stock Quote in your trigger list.

For more information on creating your own triggers and task, check this article that I posted a while back. I’ll try and post a sample task tomorrow.

Source: quote.zip
Proxipedia: Stock Quote

Proxi v1.1

Friday, June 9th, 2006

link: Proxi v1.1

In this update:

  • Added radioSHARK trigger (requires radioSHARK v2.0.1)
  • Added radioSHARK task (requires radioSHARK v2.0.1)
  • Added Battery monitor task
  • RSS Monitor errors now display in the RSS settings view
  • RSS Monitor now correctly handles more varieties of feeds
  • Fixed a problem where unnamed triggers did not appear to be selectable
  • Installer now checks to make sure Mac OS X 10.4 is installed
  • Help index now links to actual help.