LaunchBar does not hide after firing action script

Sharing and discussing custom actions for LaunchBar
Post Reply
thuhn
Posts: 4
Joined: Sun May 05, 2013 11:05 am

LaunchBar does not hide after firing action script

Post by thuhn » Tue Oct 30, 2018 1:46 pm

Hi there,

when populating an item list as action result, I can define an action script to be run on item selection:

Code: Select all

# part of my default.py
result = [ {
    'icon': 'font-awesome:download',
    'title': 'some title',
    'action': 'do-something.py',
    'actionReturnsItems': False,
    'actionRunsInBackground': False
    },
...
]


Due to actionReturnsItems=false my expected behaviour from LaunchBar was to run the action script and go to the background again. Instead launchbar displays the selected item as a one item result list and stays in the foreground.

I know I could 'tell application "LaunchBar" to hide' using AppleScript but calling an applescript by using a subprocess in a python script seems a little bit strange.

The behaviour is not related to Python, it's the same with Javascript.

What's the idea behind this behaviour? Can I change it somehow? actionReturnsItems seems not helping here.

Cheers

FredB
Rank 2
Rank 2
Posts: 69
Joined: Sun Dec 31, 2006 8:19 am
Location: Liège, Belgium
Contact:

Re: LaunchBar does not hide after firing action script

Post by FredB » Wed Nov 28, 2018 12:36 pm

You can also use the "x-launchbar:hide" URL command.
https://www.obdev.at/resources/launchbar/help/URLCommands.html

Post Reply