Sendkey("I'm tired. I think I'll become an icon for a few seconds...")
Delay(3)
WinIconize(`Untitled - Notepad`)
Display(3, szTitle, "Next, we'll make the window Maximized")
WinZoom(`Untitled - Notepad`)
Delay(2)
Display(6, szTitle, StrCat("We're back.", @CRLF, @CRLF, "ClockMan95 can wait for programs to finish before executing", @CRLF, "the next instruction in sequence."))
Display(3, szTitle, "ClockMan95 can even read standard Windows message boxes...")
Display(2, sztitle, "First, we'll close Notepad.")
WinClose(`Untitled - Notepad`)
Delay(3)
MGT1 = MsgTextGet("Notepad")
Display(5, szTitle, StrCat("We tried to close Notepad,", @CRLF, "but it displayed a message box which reads...", @CRLF, @CRLF, MGT1))
Display(3, szTitle, `So, we'll send the "N" keystroke to respond appropriately to the message box.`)
WinActivate(`Untitled - Notepad`)
SendKey("n")
Display(3, szTitle, "A ClockMan95 event can even control other programs with DDE.")
Display(2, szTitle, "Searching for Microsoft Excel...")
fExcel = FileLocate("excel.exe")
if fExcel == "" then fExcel=IniRead("extensions","xls","")
if fExcel==""
Display(2, szTitle, "Oops, so much for THAT demo - Excel not found!")
goto ExcelDone
endif
szB = strindex(fExcel," ", 0, @FWDSCAN)
if szB==0 then szB = strlen(fExcel) + 1
szB = strsub(fExcel, 1, szB - 1)
run(szB, "")
channel = DDEInitiate("Excel", "Sheet1")
Numbers = "One Two Three Four Five Six Seven Eight Nine Ten"