Nice little Autohotkey script for Joplin app

Hi, if anyone is interested I made a nice little Autohotkey script for Joplin.:

;;;;;;;;;;;;;;;;;;;;; Joplin Show;;;;;;;;;;;;;;;;;;;;;;;
Insert::
IfWinNotExist ahk_exe Joplin.exe
{
Send ^!j
Send ^s
}
else
{
IfWinActive ahk_exe Joplin.exe
{
Send ^!j
Send ^s
}
else
{
WinActivate ahk_exe Joplin.exe
}
}

sleep 10

IfWinActive ahk_exe Joplin.exe
{
CoordMode Pixel ; Interprets the coordinates below as relative to the screen rather than the active window.
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, C:\Users\your_user\whatever_the_path_you_want\joplin_bold.png
if (ErrorLevel = 0)
Send ^l
}
return

;;;;;;;;;;;;;;;;;;;;;;;;; Joplin Edit ;;;;;;;;;;;

#IfWinActive ahk_exe Joplin.exe
sc029::
{
Send ^l
Send ^s
}
return
#IfWinActive

So here is what this script does:

The "Joplin Show" part

  • When you press the "Insert" key (change it to any key you want, this will show the Joplin windows. If you press it while the Joplin windows is active, it will hide joplin. So this is a bit more easier to use than the Ctrl+Alt+J native shortcut.
  • Whenever the Joplin windows shows, there will also be a "ctrl-S" associated with it, to auto-synchronize
    -Whenever the Joplin windows shows, the program will look for a "joplin_bold.png" image on the screen and disable edit-mode (sending Ctrl-L). Yyou can take a screenshot of the "Bold" Button on the editor and save it as "joplin_bold.png". The idea behind it is to automatically disable editor view when the Joplin windows is shown. If the program see your "joplin_bold.png" on the screen, that means the editor is active, then the program will send Ctrl-L, switching the view to normal mode (if you had set it like this in the settings). I did this because I hate going to Joplin and see the editor still on, and i hate to manually get off the editor view.

The "Joplin Edit" part
-If the Joplin windows is active, pressing the "§" key (change it to whatever) will open the Edit Layout (the program will send ctrl-L). This is a slightly quicker way to edit the notes, provided you don't need to write the "§" in your notes very often.

Feel free to use this AHK script anyway you want.

2 Likes