; Simple window finder test
#Requires AutoHotkey v2.0

; Write to stdout (will show in console)
OutputDebug("Starting simple test`n")

; Try to find the window
hwnd := WinExist("Mosis Designer")

if (hwnd) {
    WinGetPos(&x, &y, &w, &h, hwnd)
    msg := "Found! X:" . x . " Y:" . y . " W:" . w . " H:" . h
} else {
    msg := "Window not found"
}

; Write result to a file
outFile := A_ScriptDir . "\simple_result.txt"
FileAppend(msg . "`n", outFile, "UTF-8")

ExitApp()
