> ## Content Index
> Fetch the complete content index at: https://www.bramadams.dev/llms.txt
> Use this file to discover other available public pages before exploring further.

# From Automator to Hazel
- URL: https://www.bramadams.dev/202301150045/
- Published: 2023-01-28T01:34:08.000Z
- Updated: 2023-01-28T01:34:38.000Z
- Author: Bram Adams
- Tags: computer

Reasoning: Multiple screenshots would lock up entire Mac on shortcuts thread [202301100128](https://www.bramadams.dev/202301100128), which I couldn't have because I use Alfred SC to run a [quick capture Obsidian shortcut](https://github.com/bramses/bramses-highly-opinionated-vault-2023?ref=bramadams.dev#from-capture-to-complete-thought-zettelkasten)

Hazel seems to fix this problem but came with it's own issues. It compressed all the (already compressed) images in the folder at init time, which was annoying.

I had to change the following:

### Automator

```sh
for f in "$@"
do
  /opt/homebrew/bin/pngquant 64 --skip-if-larger --strip --ext=.png --force "$f"
  /opt/homebrew/bin/zopflipng -y "$f" "$f"
done

```

### Hazel

![https://bram-adams.ghost.io/content/images/2023/01/hazel-compress-Screenshot-2023-01-15-00-54-11.png](https://storage.ghost.io/c/0c/cc/0ccc9a8d-054a-4056-b11e-e1bfbbb66387/content/images/2023/01/hazel-compress-Screenshot-2023-01-15-00-54-11.png)

hazel compress Screenshot 2023-01-15 00-54-11.png

```sh
/opt/homebrew/bin/pngquant 64 --skip-if-larger --strip --ext=.png --force "$1"
/opt/homebrew/bin/zopflipng -y "$1" "$1"

```

In addition, Hazel kept showing this weird error and refused to process newly inserted screenshots. Rules were matching but the workflow wasn't firing

[Noodlesoft Forums • View topic - hazel stopped working unless 'forced'](https://www.noodlesoft.com/forums/viewtopic.php?t=4649&p=15375&ref=bramadams.dev)

```
HazelHelper\[99678\] Attempted to run worker on undeployed folder

```

I had to delete folder and run the whole thing again from scratch to "unstuck" it.

This part especially pissed me off because all the online discourse around Hazel was so positive that I wasn't able to find a good centralized repository with troubleshooting -- and the logs + UI were less than helpful to say why the match was happening but the rule was failing.

> am i the only person to say something negative about hazel wth is going on with this app its so weird to maneuver

![https://bram-adams.ghost.io/content/images/2023/01/hazel-at-blank-Screenshot-2023-01-15-00-54-49.png](https://storage.ghost.io/c/0c/cc/0ccc9a8d-054a-4056-b11e-e1bfbbb66387/content/images/2023/01/hazel-at-blank-Screenshot-2023-01-15-00-54-49.png)

hazel at blank Screenshot 2023-01-15 00-54-49.png

\*date added at… (very unhelpful!!)\*

Resources:

- [Hazel review: Folder-based automation that makes life easier on macOS - Macworld](https://www.pcworld.idg.com.au/article/697675/hazel-review-folder-based-automation-makes-life-easier-macos/?ref=bramadams.dev)