 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Jerry
Joined: 24 Jun 2004 Posts: 39
|
Posted: Wed Jun 01, 2005 6:03 pm Post subject: "key history and script info" window and suggestio |
|
|
The Window title under the column "window" is no longer printed in the "key history and script info" window. (I am running version 1.0.34.00)
Suggestions to help with debugging a script.
The window displays are good but sometimes it is needed write the info to
a file so that it can be reviewed later or to track a problem back over a longer period of time.
1) ListLines Improved to be able to write the lines out to a file on a ongoing basis or as a "snapshot".
The snapshot would just write out what the window would have displayed
Command eg. ListLines , filename, ON | OFF | SNAPSHOT
2) KeyHistory Improved to be able to write the lines out to a file on a ongoing basis or as a "snap shot".
3) ListVars Write out the list to a file. Just as a snapshot.
4) ListHotkeys Write out the list to a file. Just as a snapshot.
5) HotStrings - to be included with the ListHotkeys ("hotkeys and their methods" window)
6) A way to dump the thread stack (to a window and/or as a snapshot to a file)
(threads waiting to be returned to, current thread executing)
eg.
thread line status
main 45 return
timer1 55 return
~F3 33 current
7) A way to pause all timers using the systray menu and/or a command to pause / resume all timers. That is without the
need to specify each timer separately.
8 ) A new timer that would get triggered when a variable = (=, > , <, etc) a value.
With this I could quickly add a timer on a complex script to execute the above commands when I want to start to watching the script.
Jerry |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Wed Jun 01, 2005 10:01 pm Post subject: Re: "key history and script info" window and sugge |
|
|
| Jerry wrote: | | The Window title under the column "window" is no longer printed in the "key history and script info" window. (I am running version 1.0.34.00) | The window title is only present when:
1) It's different from the window of the previous keystroke.
2) The active window has a non-blank title.
| Quote: | | 1) ListLines Improved to be able to write the lines out to a file on a ongoing basis or as a "snapshot". | I've made a note of it. If you haven't already looked at it, you might find OutputDebug useful for selective monitoring of a script.
| Quote: | | 2) KeyHistory Improved to be able to write the lines out to a file on a ongoing basis or as a "snap shot". | Although I don't think this should be done do to the stigma associated with key logging, the Key History feature was recently improved to allow a greater or lesser number of keystrokes and mouse clicks to be displayed. See #KeyHistory for details.
| Quote: | 3) ListVars Write out the list to a file. Just as a snapshot.
4) ListHotkeys Write out the list to a file. Just as a snapshot. | For these two and ListLines, you might be better off putting breakpoints in strategic locations in your script (temporarily for debugging). For example:
| Code: | ListVars
pause ; Wait for user to inspect variables and then he can manually unpause. |
You could also have a conditional check for the above:
| Code: | if DebugMode ; Toggled via some hotkey.
Gosub ListVarsAndPause |
| Quote: | | 5) HotStrings - to be included with the ListHotkeys ("hotkeys and their methods" window) | Noted; thanks.
| Quote: | | 6) A way to dump the thread stack (to a window and/or as a snapshot to a file) | This would be difficult to implement because the program uses the call stack to store suspended threads, making their info hard to access without a redesign. But it's something I'll keep in mind anyway.
| Quote: | | 7) A way to pause all timers using the systray menu and/or a command to pause / resume all timers. That is without the need to specify each timer separately. | The "pause" menu item should soon be fixed to allow an idle timer script to be paused. In case you don't know, you can also assign a hotkey to toggle pause On and Off (which also pauses all timers):
^!p::Pause ; Ctrl-Alt-P hotkey.
| Quote: | | 8 ) A new timer that would get triggered when a variable = (=, > , <, etc) a value. | Maybe I'm misunderstanding, but I think you could already do this:
SetTimer, WatchForDebug, 500
^!d::Debug := not Debug ; Hotkey to toggle boolean value.
...
You know, I started to write the above only to realize I don't really understand what you had in mind. I use the following hotkeys to help debug a script:
^!v::ListVars
^!l::ListLines
^!h::ListHotkeys
^!k::KeyHistory
You could throw in a hotkey that Pauses for good measure.
Thanks for your suggestions. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|