[ AnkiWeb page ]
This add-on just adds a reboot button to the menu bar. (Prototype)
[ Description ]
Skip sync and restart quickly.
When closed normally, it will be synced.
Restart Anki in Safe Mode (Without Add-ons)
Auto Restart After SafeMode.
Console Mode(Windows)
For Mac, the button is shown on the right.
[ Warning ]
This add-on is separated from Anki in purpose of restarting Anki, so there is a high possibility of mis-detection by antivirus software. This problem is solvable, but requires $200+ per year (Code Signing), so I’m not considering it at now.
[ Windwos ] If your antivirus software
mis-detects add-on, the “.exe” will be quarantined. It’s labeled Trojan but it’s a mis-detection, so no danger. In this case, this add-on cannot be used without Allow on device.
[ Mac ] If you do not grant permissions, it is likely that you will not be able to launch the “.app”. I’m not certain if it will work on the latest Macs.
I added the feature to auto-restart Anki after updating the add-ons. Cross-platform debugging and other add-on features are not yet complete, so it will be a while before I release it on AnkiWeb, but you can download the add-on under development for free from my Patreon page (no registration required). It has been tested only on windows, Anki 2.1.66 (Qt6).
I added the option to specify the database for Anki.
Select the Use custom base foloder(-b) checkbox and specify the path to the database, it should work.
Please note that " " is not allowed in the path.
For example, "G:\Ankiˉanki.exe" G:\Anki\anki.exe
And the -b argument is already setup, so there is no need to fill it in.
Perhaps Use Anki path manually does not need to be used.
For now, there is no function to add other arguments.
The function to restart after updating add-ons has been added to the default for the add-on,
but it does not work when updating add-ons on Anki startup.(Perhaps it works only when manually updating from the add-ons dialog.)
If restarting in the middle of the process, the process will be interrupted, so this feature is still under development.
Cool add-on and really awesome presentation, @Shigeyuki !
I use the following AutoHotkey (v2) script to quickly restart Anki by pressing Win+N when Anki’s main window is active. When I press Control+Win+N the script also toggles night mode on or off before restarting. (For languages other than German the script would have to be modified slightly for this to work.)
#SingleInstance Force
#Requires AutoHotkey v2.0-
#HotIf WinActive("ahk_exe anki.exe")
#HotIf WinActive("- Anki")
#N:: ; Restart Anki with the same profile by pressing Win+N when the Anki-window is active.
{
profile := RegExReplace(WinGetTitle("A"), " - Anki$")
path := WinGetProcessPath("A")
Send "!{F4}"
ProcessWaitClose("anki.exe")
Run path ' -p "' profile '"'
}
^#N:: ; Restart Anki with the same profile by pressing Win+N when the Anki-window is active - but also toggle nightmode
{
profile := RegExReplace(WinGetTitle("A"), " - Anki$")
path := WinGetProcessPath("A")
Send "^p"
WinWaitActive("Einstellungen")
MouseClick("Left", 47, 74)
Send "{Tab 7}{Space}{Esc}"
WinWaitActive("Anki")
Send "{Enter}"
WinWaitActive(profile)
Send "!{F4}"
ProcessWaitClose("anki.exe")
Run path ' -p "' profile '"'
}
#HotIf
#HotIf