How to hide LaunchBar when executing an AppleScript?

Sharing and discussing custom actions for LaunchBar
Post Reply
dbyler
Posts: 9
Joined: Fri Nov 09, 2007 6:07 pm

How to hide LaunchBar when executing an AppleScript?

Post by dbyler » Thu Sep 08, 2011 7:59 pm

When executing an interactive AppleScript (specifically the Snooze script for OmniFocus), LaunchBar doesn't hide itself. Unfortunately, if any LB results are showing besides the one currently executing, LB may obscure the script dialog box (see attached screenshot).

I see this is "new" behavior as of This version of the script calls the hide URI before the dialog box is shown, but it doesn't have an effect on LaunchBar.

Also, I'd prefer not to use LB-specific code when many users are using other shortcut tools to launch the scripts (I use FastScripts for this).

What's the best way to handle this?
Attachments
obscured.png
screen shot
obscured.png (57.56 KiB) Viewed 3579 times

Was
Rank 2
Rank 2
Posts: 70
Joined: Wed Jan 13, 2010 2:27 am

Re: How to hide LaunchBar when executing an AppleScript?

Post by Was » Fri Oct 14, 2011 7:46 pm

I *think* you can make LB hide when doing this by holding down alt while executing the script while LB. It works for me with the iPhone Sync action (which otherwise leaves LB hanging until the sync has finished).

signupsammy
Posts: 12
Joined: Mon Mar 15, 2010 5:37 am

Re: How to hide LaunchBar when executing an AppleScript?

Post by signupsammy » Sat Oct 15, 2011 1:26 am

Unless I'm misunderstanding something, adding this line at the beginning of your script (below "on run" or "on handle_string")

tell application "LaunchBar" to hide

Hope that works for you.

Post Reply