Actions fails in LB 6.1 Nightly

General discussions about LaunchBar
Post Reply
Ayla
Posts: 17
Joined: Mon Jul 07, 2014 12:22 pm

Actions fails in LB 6.1 Nightly

Post by Ayla » Mon Aug 11, 2014 2:09 pm

Hi

I have som actions I've made myself, which work perfectly in LB 6.0.2.

But, if I install the latest LB 6.1 Nightly, they fail to run.

With LB 6.1 Nightly, if I press 'space' on my action, it shows the name of the action in Large Type.

If I press 'enter', it fails with:

Code: Select all

The script does not implement a handler named "run".


My script doesn't have a "run" handler, just "handle_string" which works fine in LB 6.0.2

Here is my default.scpt:

Code: Select all

-- take string from LaunchBar and run as command
on handle_string(theText)
   try
      set cmd to "ssh -t MyUser@" & theText & ".domain.com 'df -H | grep disk'"
      --do shell script "echo " & input & " | tr a-z A-Z"
      set output to (do shell script cmd)
      tell application "LaunchBar"
         set selection as list to output
         --activate
      end tell
   on error e
      tell application "LaunchBar" to display in large type "Error: " & e
   end try
   return output
end handle_string

Jono
Rank 4
Rank 4
Posts: 161
Joined: Mon Feb 25, 2008 11:25 am
Location: UK
Contact:

Re: Actions fails in LB 6.1 Nightly

Post by Jono » Wed Aug 13, 2014 12:56 pm

Yes, I've noticed that any actions I've made where I enter text now fail in the latest beta.
I guess they changed something without letting us know :?

sven.luetkemeier
Posts: 8
Joined: Mon Jan 18, 2010 11:48 pm

Re: Actions fails in LB 6.1 Nightly

Post by sven.luetkemeier » Thu Aug 14, 2014 6:41 am

According to an answer I got via e-Mail from Obdev's support the lastet build requires the LBAcceptedArgumentTypes in the Info.plist to be set (see http://www.obdev.at/resources/launchbar/developer-documentation/action-info-plist.html). This fixed this issue for me.

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

Re: Actions fails in LB 6.1 Nightly

Post by Ayla » Thu Aug 14, 2014 9:42 am

sven.luetkemeier wrote:According to an answer I got via e-Mail from Obdev's support the lastet build requires the LBAcceptedArgumentTypes in the Info.plist to be set (see http://www.obdev.at/resources/launchbar/developer-documentation/action-info-plist.html). This fixed this issue for me.


Thanks for the reply.

So it should say this in Info.plist?:

Code: Select all

<key>LBAcceptedArgumentTypes</key>
   <array>
   <string>string</string>
   </array>


It still doesn't work for me, with that change.

Also, the LBAcceptedArgumentTypes doesn't say (Required) next to it in the action info plist guide.

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

Re: Actions fails in LB 6.1 Nightly

Post by Ayla » Thu Aug 14, 2014 11:08 am

OK, I got it working now;

I needed to add this to the plist:

Code: Select all

         <key>LBAcceptedArgumentTypes</key>
         <array>
         <string>string</string>
         </array>


And this to the script:

Code: Select all

on run
   return [{title:"No arguments passed"}]
end run

Jono
Rank 4
Rank 4
Posts: 161
Joined: Mon Feb 25, 2008 11:25 am
Location: UK
Contact:

Re: Actions fails in LB 6.1 Nightly

Post by Jono » Thu Aug 14, 2014 12:37 pm

Thanks.

It would have been helpful if they'd reported this, either in the release notes, here on the forum, or at least somewhere :?

m267
Posts: 16
Joined: Fri Mar 14, 2014 4:57 pm
Location: DE or CH

Re: Actions fails in LB 6.1 Nightly

Post by m267 » Wed Aug 20, 2014 2:56 am

Thanks a lot for sharing!

I already thought the nightly was broken and I suspended my not-working actions till they would have fixed it…
Heck, yes, if they change something that breaks your actions a sticky in this forum would be a nice move. But I’m not sure if they know about this forum ;)

Post Reply