Designing Launchbar 6 Ruby Actions part Deux

Sharing and discussing custom actions for LaunchBar
beerich
Rank 3
Rank 3
Posts: 151
Joined: Thu Apr 05, 2007 11:05 am
Location: Toronto

Designing Launchbar 6 Ruby Actions part Deux

Postby beerich » Mon Feb 27, 2017 7:08 pm

Hi folks.

So I'm wanting to use LB to send parameters to Ruby scripts. I can split('/') on a single parameter, which is just fine. I'm not clear as to how to get LB to launch a ruby script with a parameter. I'm assuming it's an Action URL Script, but not clear on the action. I wrote a Fahrenheit to Celcius action as an example:

Code: Select all

x-launchbar:calculate?argument=*&expression=(@-32)*0.555555556&title=@%c2%b0F%20to%20%c2%b0C:&result=@


calculate is the action in this instance. To aim at iTerm2 (my terminal) or a ruby script, or an AppleScript that can parse and send it to a ruby script. I would prefer not using AppleScript as it can be flaky.

Anyway, any insight appreciated on how I can achieve this. I'm currently looking at the Action Editor, but it's still confusing.

Cheers

beerich
Rank 3
Rank 3
Posts: 151
Joined: Thu Apr 05, 2007 11:05 am
Location: Toronto

Re: Designing Launchbar 6 Ruby Actions part Deux

Postby beerich » Mon Feb 27, 2017 9:08 pm

SOLVED

OK that was fast. Went into the Launchbar.app contents, copied an action to the desktop, modified the info.plist, wrote my Applescript that takes the single parameter, and writes it to iterm2.

Boom. Launchbar to Database completed. Let the fun begin.


Return to “LaunchBar Actions”

Who is online

Users browsing this forum: Google Feedfetcher and 3 guests