# Beeminding via LaunchBar (or Alfred, or anywhere on your Mac)

**URL:** <https://forum.beeminder.com/t/beeminding-via-launchbar-or-alfred-or-anywhere-on-your-mac/6060>\
**Category:** uncategorized\
**Created:** [December 6, 2019, 10:55am UTC](https://forum.beeminder.com/t/beeminding-via-launchbar-or-alfred-or-anywhere-on-your-mac/6060 "2019-12-06T10:55:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbyler](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/dbyler/32/1936_2.png) [@dbyler](https://forum.beeminder.com/u/dbyler)\
**Post date:** [December 6, 2019, 10:55am UTC](https://forum.beeminder.com/t/beeminding-via-launchbar-or-alfred-or-anywhere-on-your-mac/6060/1 "2019-12-06T10:55:11Z")

</div>

Greetings, Beeminderers! Thought I’d share a couple scripts I’ve been using to quickly beemind from anywhere on my Mac without opening an app/visiting a web page/etc.

# Beemind Anything

The first one, imaginatively titled [Beemind Anything 🐝](https://github.com/dbyler/applescript-misc/blob/master/Beemind%20Anything%20%F0%9F%90%9D.applescript), checks for _all_ your goals, shows which ones have upcoming deadlines, and lets you log data points.

I invoke my scripts via LaunchBar, so I type `command-space` to invoke Launchbar → `bee [enter]`to run the script:

 ![1-Invoke script](https://us1.discourse-cdn.com/flex019/uploads/beeminder/original/2X/5/5b1b8a130711ae595d7256fee8dce6c9ab0ec8ff.gif)

The script fetches and shows a list of my Beeminder goals (in order of next derailment). If a goal is close to derailing, a warning emoji is shown, along with the cost of derailing. In the above image, the `anki` goal will derail today at a cost of $90, and the `mits` goal will derail tomorrow at a cost of $30.

If you want to log a data point, just pick one and enter the value (and optional comment):

 ![3-log](https://us1.discourse-cdn.com/flex019/uploads/beeminder/original/2X/b/ba24c4f8ae9c395f918b863d192ce621b5090ab2.gif)

Note that this script requires the free [JSON Helper utility](https://itunes.apple.com/app/json-helper-for-applescript/id453114608?mt=12).

# Beemind {{specific goal}}

I also have a suite of scripts hardcoded to specific goals for even faster access. I just duplicate the script and update the settings per goal.

No screencast because the fastest invocation (no prompts to update the default values) goes straight from LaunchBar to a success notification. 🙂

[Here’s the template](https://github.com/dbyler/applescript-misc/blob/master/Beemind%20%24GOAL.applescript).

Configuration options:

- Default data point value
- Prompt for data point value? (If true, you’ll be prompted to update the default value; if false, it will bypass a prompt and just use the default value you set)
- Default comment
- Prompt for comment?
- If using a launcher, do you want the passed parameter to be the data point or the comment?

On that last point, LaunchBar (and Alfred) let you send data to a script. With LaunchBar you do that by tapping `space` while an item is selected.

So to log a specific value to your `crank-widgets` goal, you could type

- `command+space`(to invoke LaunchBar)
- `cw`(to invoke your “Beemind Cranking Widgets” script)
- `[space] 25 [enter]` to send the value `25` to the script.

(I did my best to set it up to work with Alfred as well, although I don’t use Alfred.)

Not sure where to run scripts from? You’ve got options: a launcher (e.g., LaunchBar or Alfred), a dedicated script runner (e.g., FastScripts), a general automation utility (e.g., Keyboard Maestro, BetterTouchTool), or even the built-in Scripts menu.

Again, the links are

- [Beemind Anything 🐝.applescript](https://github.com/dbyler/applescript-misc/blob/master/Beemind%20Anything%20%F0%9F%90%9D.applescript)
- [Beemind $GOAL.applescript](https://github.com/dbyler/applescript-misc/blob/master/Beemind%20%24GOAL.applescript)

Enjoy…

---

<div class="post-metadata">

**Author:** ![dbyler](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/dbyler/32/1936_2.png) [@dbyler](https://forum.beeminder.com/u/dbyler)\
**Post date:** [December 6, 2019, 10:56am UTC](https://forum.beeminder.com/t/beeminding-via-launchbar-or-alfred-or-anywhere-on-your-mac/6060/2 "2019-12-06T10:56:58Z")

</div>

By way of sheepish confession, I should probably have written

> scripts I’d been using

instead of

> scripts I’ve been using

…since I’ve taken a break from Beeminding in 2019. But it’s still a community I value and high time I shared. 😉

---

<div class="post-metadata">

**Author:** ![phi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/phi/32/2586_2.png) [@phi](https://forum.beeminder.com/u/phi)\
**Post date:** [December 6, 2019, 4:05pm UTC](https://forum.beeminder.com/t/beeminding-via-launchbar-or-alfred-or-anywhere-on-your-mac/6060/3 "2019-12-06T16:05:24Z")

</div>

Nice! I love it! Especially since I’m in a love hate relationship with Mac Automation.  
First question that comes to mind is why the fudge did you do this in Apple Script? Arguably it’s not the worst language, especially compared to JavaScript but I still think that JavaScript is maybe slightly less awkward to use than AppleScript?  
But then again – why program this as Mac Automation in the first place? I mean you’re not automating any GUI so why limit yourself to that?

---

<div class="post-metadata">

**Author:** ![dbyler](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/dbyler/32/1936_2.png) [@dbyler](https://forum.beeminder.com/u/dbyler)\
**Post date:** [December 7, 2019, 3:57am UTC](https://forum.beeminder.com/t/beeminding-via-launchbar-or-alfred-or-anywhere-on-your-mac/6060/4 "2019-12-07T03:57:06Z")

</div>

Ha, fair question. Short answer: I’ve been whipping scripts together in AppleScript for as long as I can remember so it was just the default option.

Definitely did want something lightweight that I could trigger via LaunchBar, though. What would you use for something like this?

---

<div class="post-metadata">

**Author:** ![phi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/phi/32/2586_2.png) [@phi](https://forum.beeminder.com/u/phi)\
**Post date:** [December 7, 2019, 5:41pm UTC](https://forum.beeminder.com/t/beeminding-via-launchbar-or-alfred-or-anywhere-on-your-mac/6060/5 "2019-12-07T17:41:05Z")

</div>

Scala 🙂
