Page 1 of 1

LaunchBar does not hide after firing action script

Posted: Tue Oct 30, 2018 1:46 pm
by thuhn
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

Re: LaunchBar does not hide after firing action script

Posted: Wed Nov 28, 2018 12:36 pm
by FredB
You can also use the "x-launchbar:hide" URL command.
https://www.obdev.at/resources/launchbar/help/URLCommands.html