Code: Select all
#F9::
{
Action := InputBox("action")
switch Action {
case "todo":
{
obsidianWindowName := "ahk_exe Obsidian.exe"
DetectHiddenText True
if (WinExist(obsidianWindowName)) {
WinActivate(obsidianWindowName)
} else {
Run "C:\Users\yop\AppData\Local\Obsidian\Obsidian.exe"
Run "obsidian://open?vault=Obsidian&file=TODO.md"
}
WinWaitActive(obsidianWindowName)
}
default:
Run "notepad"
}
}
Unfortunately when I type todo the default action is ran (Notepad opens). What am I missing?
Note: I tried to remove the block delimiters ({}) around the todo block but the result is the same