Select Category in Banktivity

banktivity

#1

I've found it tedious to change categories in Banktivity, especially when trying to find a subcategory. I put together a small macro that pulls all the categories and gives you a list that allows better searching and then assigns the category to the transaction.

Details

I first get a list of all categories from the menu bar

tell application "System Events"
	tell process "Banktivity 6"
		return name of every menu item of menu 1 of menu item "Change Category" of menu 1 of menu bar item "Transaction" of menu bar 1
	end tell
end tell

I then replace the commas with new lines so that KM can display them as a list.

Once the category is chosen, the menu item is clicked and the category assigned.

const BANKTIVITY = 'Banktivity 6'

const app = Application(BANKTIVITY);
app.includeStandardAdditions = true;

const SystemEvents = Application('System Events');
const BanktivityProcess = SystemEvents.processes[BANKTIVITY];

const kme = Application("Keyboard Maestro Engine");
const selectedCategory = kme.getvariable('BanktivityCategory').trim();

BanktivityProcess
  .menuBars.at(0)
	.menuBarItems.byName('Transaction')
	.menus.at(0)
	.menuItems.byName("Change Category")
	.menus.at(0)
	.menuItems.whose({title: selectedCategory}).at(0)
	.click()

Add Category.kmmacros (4.5 KB)


#2

Great to see a fellow Banktivity user! Heaven knows Banktivity’s UI is rather less that ideal.


#3

Agreed! It's been my life's goal to try to automate their transaction import flow. Even GUI scripting has been a pain to get it to work.


#4

The sad part is that one of my most used macros is Option-Tab mapped to pressing Tab five times to make up for their ridiculous data entry UI.


#5

The app is unfortunately very confusing. It's still the best of the available options, but I can't say I love it. I've had no luck getting the regex matching to work for similar transaction names in rules.


#6

I haven't tried the downloaded statements (I don't really want yet another subscription).


#7

I've personally found the subscription useful. Part of the reason I'm bad about tracking money is I forget to track it.


#8

I use Actual for mac and soon iOS.

I find its UX really great. It's cheaper and cleaner version of YNAB. The dev behind it also made Prettier.


#9

Here's an update to my Banktivity macros. It's updated to support Banktivity 7. I also added another macro for easily tagging transactions

Banktivity Macros.kmmacros (8.7 KB)

@peternlewis curious if you have any other useful macros you're using on a regular basis in Banktivity


#10

I have a number of Banktivity macros. I manually enter all my receipts, and manually reconcile my bank statements, so a lot of my Banktivity macros relate to that.

I have many in the form of quick entry macros, all with option-letter hot keys, such as:

  • Trigger: ⌥B
  • Insert text by typing “%Tab%Bakery%Tab%%Tab%%Tab%%Tab%%Tab%8.50%Tab%”
  • Type Shift-Tab

After entering the date, I press this, and it enters the rest of the fields (pressing all those inane Tabs caused by Banktivity’s moronic interface!) and then shift-Tabing to reselect the amount so I can enter it in if it is different to usual.

I have a couple macros that do quick calculations, GST (or ex-GST), from US$, etc. Basically just:

  • ⌘A
  • Copy
  • Set Variable Value to %SystemClipboard%
  • Search & Replace to remove the $ sign
  • Set Variable Value to ROUND(Value/11 * 100)/100 (or whatever)
  • Insert Text by Typing %Variable%Value%
  • Delete Current Clipboard

Super Tab:

  • Trigger Option-Tab
  • Repeat 5 times
    • Tab

That I need the Super Tab macro, and that I have used it over a thousand times speaks to the sadness that is Banktivity’s UI.

I also have a macro that displays a ruler on the screen (a Custom HTML Prompt action) that I can use to keep track of where I am in the reconciliation (open in Preview as a PDF), moving down a line with a key press. That is quite handy, but I doubt it's useful to anyone else.