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