Code: Select all
-- This simple script uses LaunchBar to generate a reminder after a given number of minutes. It takes input from LaunchBar in the format "<min>-<message>", where <min> is the number of minutes to delay and <msg> is the notification to be displayed when the timer expires. The two values are separated with a single hyphen character. Example: "5-order pizza". Written by Dennis Rande, 2008-04-08.
on handle_string(input)
if input is not "" then
open location "x-launchbar:hide"
set AppleScript's text item delimiters to "-"
set interval to first text item of input
set msg to last text item of input
set AppleScript's text item delimiters to ""
delay (interval * 60)
open location ("x-launchbar:large-type?string=" & msg)
end if
end handle_string
ludwigschubert wrote:That's basically the same Applescript that I posted here a few months ago, although mine can do seconds, minutes, hours and days
ludwigschubert wrote:Really, I found my script to be quite unusable and I would imagine it's the same with Dennis' since it's basically the same code. Dennis, please don't see this as an affront, I just think that there has to be a better way that allows LaunchBar to be used while a message is waiting. The "x-launchbar:hide" call solves the problem of LaunchBar being visible while waiting, but not that of using LaunchBar.
JC wrote:I just found out what you meant -- I can't use launch bar while I'm waiting for the reminder. Oh man, that doesn't work right. Anyway to fix this?
JC wrote:I wonder how you figured that one out.
Running scripts in background
By default, LaunchBar runs AppleScripts in foreground, i.e. you cannot perform any further action in LaunchBar until the script has finished executing.
You can optionally run specific scripts in background by opening them with Shift-Return.
Users browsing this forum: No registered users and 1 guest