A friendly hello
I have created a macro that monitors a folder in which a snapshot of the integrated FaceTime camera is saved after every login process on the Mac. If this is the case, the snapshot is sent to my iDevices via a pushover notification. The plugin to Pushover was nicely downloaded from here
I submitted a pull request on github, but until/unless it is merged you can find the fix here:
The optional values would fail if their length was less than the default values.
and here posted
I've posted a plug-in action that allows you to send notifications to the Pushover service. Notifications can be sent to iOS, Android or desktop computers.
I've posted the plug-in, along with instructions on my git hub page:
Pushover Plug-in on GitHub
The Pushover service is free and you'll need to create an application API key to use the Pushover plug-in. Pushover allows 7,500 notifications/month per user for free so unless you're sending a lot of notifications it should remain free for you. …
Here is an example from my workflow:
My problem is that I don't know what actions I need so that only the current image and not all the existing ones in the folder are sent.
Here is my macro:
iMac login.kmmacros (50,5 KB)
With Hazel 4 there is the possibility to solve this problem, but I can only do it with a Mail/AppleScript. This means that you can interrupt the background mail action.
I found a script on the internet that allows you to attach a picture from Pushover 3.0 on. However, I only get the file path of the image:
#!/bin/sh -e
curl -s
-F "token=aoxxxxxxxxxxxxxxxx5"
-F "user=uxxxxxxxxxxxxxxxxxyrq"
-F "title=${1##*/}"
-F "message=iMac Login
Date: $(date '+%Y.%m.%d / Time: %H:%M')
-F "attachment=@Nachricht.png"
$1
"
https://api.pushover.net/1/messages.json
Since I would like to use this via the script in Hazel 4, my question is whether anyone would know a solution here? @kvanh or @jon123 ?
Hi,
Where is your "Nachricht.png" file? The path should probably be in this form:
@/Users/UserName/Desktop/Nachricht.png
1 Like
Thanks @carycrusiau for the tip. I have entered the path, but get an error message.
If that doesn't work, it's not so bad either, because I can do it very well with KM's folder monitoring.
Can you tell me if I can improve the Macro folder (here iLock)? I don't know much about the variables, etc.
https://cl.ly/99da13
iMac iLock.kmmacros (21,7 KB)
Tom
August 8, 2019, 2:16pm
4
Instead of the “For Each” with “%Variable%Image%”, just use the trigger value token : %TriggerValue%
.
Example:
This returns the path of the added file.
1 Like
Thanks @Tom for your info I will try it and get back to you.
Tom:
%TriggerValue%
.
Many thanks @Tom for your help It is exactly what I was looking for.
So I can easily access the existing Pushover KM plugin and customize it.
You will save me some Hazel rules