NAME

Win32::CtrlGUI::State::DebugTk - a Tk debugger of sorts for Win32::CtrlGUI::State

Rudimentary Instructions

If you want to try a cool demo, simply close all open Notepad windows and then open a single, empty Notepad window. Then run demotk.pl. Resize the Tk window that pops up so you can see stuff. Then do the same thing, but first open demotk.pl in Notepad and add a single carriage return to the end of the file. Then play with fresh Notepad windows that have random text in them (the contents will get save to C:\Temp\saved.txt, so if you have a file by that name in existence, be careful:).

The color scheme is: Red and bold: active state Black and bold: possible next state Black and not-bold: possible future state (but not possible next state) Black and crossed out: state will never be reached Dark red: state has been executed

Also notice that you can pause and resume scripts. You have to hit exit to terminate the script, but if you don't set $Win32::CtrlGUI::State::DebugTk::debugmode to 1, it will terminate as soon as the Win32::CtrlGUI::State stuff is finished, making it ideal for using with production scripts.

Also, try opening the Notepad window, waiting for the script to recognize it (state goes red), but then close it before it sends the text. Notice that it halts the script and alerts you.