Page 1 of 1

Make launchbar go to volumes

Posted: Thu May 12, 2011 9:05 pm
by aristidesfl
I'm writing an applescript to mount a specific volume using a shell script.

I would like lauchbar to go to Volumes smart folder after the shell script is done.
How can I do this?

BTW, is there anyway to make this specific applescript run in the background always? Without having to press Option every time I launch it?


Thanks

Re: Make launchbar go to volumes

Posted: Thu May 26, 2011 3:57 pm
by manfred
I would like lauchbar to go to Volumes smart folder after the shell script is done.
How can I do this?


Something like this?

Code: Select all

tell application "LaunchBar"
   set selection to "/Volumes"
end tell


BTW, is there anyway to make this specific applescript run in the background always? Without having to press Option every time I launch it?

AppleScripts placed in ~/Library/Application Support/LaunchBar/Actions are running in background per default.

Re: Make launchbar go to volumes

Posted: Thu May 26, 2011 11:05 pm
by aristidesfl
Something like this?
CODE: SELECT ALL
tell application "LaunchBar"
set selection to "/Volumes"
end tell

This selects /Volumes.. any way of showing its contents instead? Or perhaps show the contents of the smart folder called Volumes?


AppleScripts placed in ~/Library/Application Support/LaunchBar/Actions are running in background per default.

Not here.. running an action that takes a while, causes launchbar to hang (just like when you copy big files).
Using Option, launchbar goes away while the script executes.

Re: Make launchbar go to volumes

Posted: Fri May 27, 2011 11:55 am
by manfred
aristidesfl wrote:This selects /Volumes.. any way of showing its contents instead? Or perhaps show the contents of the smart folder called Volumes?

Currently only via launchbar url – a hidden functionality wohoo ;)
Using AppleScript it might look like this:

Code: Select all

open location "x-launchbar:browse?path=/Volumes"

Whether you want to search this selection or not, it is possible to append »&subsearch«


Not here.. running an action that takes a while, causes launchbar to hang (just like when you copy big files).
Using Option, launchbar goes away while the script executes.

Ups, my bad. It works with shell scripts but not with Apple Scripts.

Re: Make launchbar go to volumes

Posted: Fri May 27, 2011 3:10 pm
by aristidesfl
open location "x-launchbar:browse?path=/Volumes"


This produces the same effect... it doesn't show the content of Volumes

Re: Make launchbar go to volumes

Posted: Fri May 27, 2011 3:26 pm
by manfred
What version of LaunchBar do you use? This feature is available in LaunchBar 5.1

Re: Make launchbar go to volumes

Posted: Fri May 27, 2011 4:31 pm
by aristidesfl
Version 5.1 beta 2 (705)

The feature is working.. but the result is not the intended.
I want to see a list of mounted volumes. That shows me a folder called volumes, not the contents..

Re: Make launchbar go to volumes

Posted: Fri May 27, 2011 4:41 pm
by manfred
This is what LaunchBar looks like if I run the AppleScript:
screen.png
screen.png (18.66 KiB) Viewed 9118 times

It shows a list of all devices mounted to /Volumes. Isn't it the same on your computer?

Re: Make launchbar go to volumes

Posted: Fri May 27, 2011 4:57 pm
by aristidesfl
This what happens here:
Screen shot 2011-05-27 at 3.55.32 PM.png
Screen shot 2011-05-27 at 3.55.32 PM.png (11.66 KiB) Viewed 9104 times

Re: Make launchbar go to volumes

Posted: Mon Jun 06, 2011 6:09 pm
by manfred
Are there any mounted directories in /Volumes? If a directory is empty, LaunchBar can't browse it's content.

Re: Make launchbar go to volumes

Posted: Mon Jun 06, 2011 6:29 pm
by aristidesfl
Yes, there are, and it's browsable manually

Re: Make launchbar go to volumes

Posted: Wed Jun 08, 2011 11:08 am
by keitofu
I've tried the code provided by manfred and it works well here (Launchbar version 5.0.4 (682)).
Hey, I'm not up to date !! Well I'll download the last version right away :)


edit : still works after the update

Re: Make launchbar go to volumes

Posted: Wed Jun 08, 2011 12:39 pm
by aristidesfl
Proof of my stupidity:
Screen shot 2011-06-08 at 11.38.16 AM.png
Screen shot 2011-06-08 at 11.38.16 AM.png (25.24 KiB) Viewed 9040 times


It was in the end of the script overriding the open location command

Thanks everyone

Re: Make launchbar go to volumes

Posted: Thu Jun 09, 2011 9:18 am
by manfred
Every developer knows such situations all too well ;)
Nice that it works now!