1if A_ScreenWidth != 800 || A_ScreenHeight != 600
2 throw Error("This fixture requires an 800 by 600 desktop")
3OnError((exception, mode) => (FileAppend(exception.Message, "**"), ExitApp(1)))
4DetectHiddenWindows false
5app := ComObject("OneNote.Application")
6app.NavigateTo("{5A2F2B1E-5560-41EF-8323-49E6567546A9}{1}{B0}", "", false)
7hwnd := WinWait("ahk_class Framework::CFrame ahk_exe ONENOTE.EXE",, 10)
8if !hwnd
9 throw Error("OneNote window did not appear")
10WinMaximize(hwnd)
11WinActivate(hwnd)
12if !WinWaitActive(hwnd,, 10)
13 throw Error("OneNote window did not become active")
14app.NavigateTo("{5A2F2B1E-5560-41EF-8323-49E6567546A9}{1}{B0}", "", false)
15Sleep 300