I am working on an Autohotkey script to take screenshot, save image and generate image macro, which might be useful for community.
The script can be found here: GitHub - byzheng/tw-autohotkey: Autohotkey for Tiddlywiki
See below for the short description.
This script defines two hotkeys for interacting with TiddlyWiki (node.js version):
- Win+F: Takes a screenshot of the active window, saves it to specified folder
- Win+X: Save image into specified folder from
Save Asdialog
The specified folder is under the tiddlywiki root folder and defined as tiddlywikiPath. The files are stored under files/images/YYYY/ subfolder with filename as timestamp.
The image macro is automatically generated and copied to clipboard, which can be pasted into TiddlyWiki. The macro text can be modified in the InsertImageToTiddlyWiki function.
If Tiddlywiki tw-livebridge (>=0.0.12) is installed and running, the macro text is also sent to TiddlyWiki via WebSocket with message type modify-tiddler.
If VS Code exenstion TiddlyEdit (>=0.2.5) is installed and running, the image macro is also inserted into the current tiddler being edited.
Usage:
- Modify the
tiddlywikiPathvariable to point to your TiddlyWiki folder. - Modify the
tiddlywikiWsUrlvariable if your WebSocket URL is different. - Modify the
InsertImageToTiddlyWikifunction to change the image macro format if needed. - Ensure you have AutoHotkey v2.0 or above installed.
- Use #Include tiddlywiki.ahk to include this script in your main AHK script.
