# AnkiRestart🔂\[Support Thread\]

**URL:** <https://forums.ankiweb.net/t/ankirestart-support-thread/34465>\
**Category:** Add-ons\
**Created:** [September 17, 2023, 6:01pm UTC](https://forums.ankiweb.net/t/ankirestart-support-thread/34465 "2023-09-17T18:01:52Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![basiskarten](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/basiskarten/32/826_2.png) [@basiskarten](https://forums.ankiweb.net/u/basiskarten)\
**Post date:** [February 7, 2024, 4:18pm UTC](https://forums.ankiweb.net/t/ankirestart-support-thread/34465/15 "2024-02-07T16:18:56Z")

</div>

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.)

```auto
#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

```

---

_[View the full topic](https://forums.ankiweb.net/t/ankirestart-support-thread/34465)._
