How do I reference a script in the .lbaction folder?

Sharing and discussing custom actions for LaunchBar
Post Reply
Ayla
Posts: 17
Joined: Mon Jul 07, 2014 12:22 pm

How do I reference a script in the .lbaction folder?

Post by Ayla » Thu Aug 14, 2014 12:27 pm

Hi

In the MyAction.lbaction/Contents/Scripts/ folder, I have my default.scpt.

From the default.scpt script, I would like to reference another script in the same folder, so I can bundle the "Script.sh" script within the .lbaction folder.

Any ideas how to do this?

Here is excerpt of the code.

default.scpt:

Code: Select all

on handle_string(theText)
      set output to (do shell script "/Users/MyUserName/Downloads/Script.sh " & theText)

prenagha
Rank 3
Rank 3
Posts: 87
Joined: Mon Nov 05, 2012 4:10 pm

Re: How do I reference a script in the .lbaction folder?

Post by prenagha » Thu Aug 14, 2014 10:09 pm

I think it is just current directory, so no path needed

I do something similar from javascript calling to shell script

https://github.com/prenagha/launchbar/b ... default.js

Code: Select all

 var exp = LaunchBar.execute('/bin/bash', 'resolve.sh', url);

Ayla
Posts: 17
Joined: Mon Jul 07, 2014 12:22 pm

Re: How do I reference a script in the .lbaction folder?

Post by Ayla » Mon Aug 18, 2014 10:31 am

prenagha wrote:I think it is just current directory, so no path needed

I do something similar from javascript calling to shell script

https://github.com/prenagha/launchbar/b ... default.js

Code: Select all

 var exp = LaunchBar.execute('/bin/bash', 'resolve.sh', url);


Thanks for the reply.

It doesn't work with my AppleScript, if I try and use (I have the ldap_lookup.sh script next to the default script):

Code: Select all

set output to (do shell script "ldap_lookup.sh" & theText)


Any ideas?

Post Reply