You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can use this global search in Obsidian to find which timers are still running:
/(?<!"startTime":null,)"endTime":null/
I also wrote this AHK script (Windows only) which shows a modal when closing Obsidian if any timer is unstopped:
#NoEnv; Recommended for performance and compatibility with future AutoHotkey releases.; #Warn ; Enable warnings to assist with detecting common errors.SendModeInput ; Recommended for new scripts due to its superior speed and reliability.SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.Main:
SetTitleMatchMode RegEx
WinWait,- Obsidian v[0-9. ]+$
WinWaitClose,- Obsidian v[0-9. ]+$
ObsisdianCheckUnclosedTimers()
Goto, Main
ObsisdianCheckUnclosedTimers(){
VaultPath := "C:\Path\To\Vault"if!FileExist(VaultPath)
return
SearchPattern := VaultPath . "*.md"Loop, Files, %SearchPattern%, R
{
FileRead, FileContents, %A_LoopFileFullPath%
If (ErrorLevel) {
MsgBoxError : %A_LastError%
return
}
FoundPos := RegExMatch(FileContents, "(?<!""startTime"":null,)""endTime"":null")
If (FoundPos)
{
MsgBox, 4,, Timers are still running. Run Obsidian?
IfMsgBoxYesRun, obsidian://search?vault=Notes&query=/(?<!.startTime.:null`,).endTime.:null/return
}
}
return
}
RT, or a way to find which one is still running to prevent from forgetting
The text was updated successfully, but these errors were encountered: