[Suggestion] group repeated lines "Lines most recently executed"; built-in variables used "Variables and their contents"
Posted: 08 Nov 2017, 13:30
So, I'd make two small changes to the logging under "View" in "Lines most recently executed" and "Variables and their contents." There could be very good reasons against this, but thought I'd throw it out there.
1.
In "Lines most recently executed," if I'm in a loop, I might look and see nothing but:
Where the "..." is about a 70 repeats of:
That's very little useful information. What happened before it? How many times has it been looping? How about instead:
This could either be a change to "Lines most recently executed Ctrl+L" or it could be a new view called "Dense lines most recently executed Ctrl+D" (I would say "Condensed", but following the format of the other views, the hotkey would be Ctrl+C, which would be less ideal for obvious reasons).
2.
In "Variables and the Contents" it shows much useful information. This and the other view are the only two I typically use. But I often find myself using the built-in variables (as do most people), such as "a_index" in my script (or a_screenwidth, or a_cursor, etc.). Now, there are tons of bulit-in variables, so it would be foolish to display them all. However, if a built-in variable ever gets called in a script, then I want to see its current value (even if it's not in the last line executed). If for example a script has
Then (I think) a_index should be show be shown with whatever value it might have when I go to Variables and the Contents (note, I have no idea what the VarSetCapacity is of a_index, I'm just making up the stuff in the brackets). For example, if last line executed was the "msgbox" then it would show:
And if the last line executed was the "return" it would show:
Anyway, these are my humble suggestions. Thanks for reading.
1.
In "Lines most recently executed," if I'm in a loop, I might look and see nothing but:
Code: Select all
---- scriptlocation\script.ahk
073: if (match!="")
074: Result .= match . ","
077: }
071: foundpos:=regexmatch(haystack,"(?:[a-z0-9!#$%&'*+/=?^_{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_{|}~-]+)*|""(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*"")@(?:(
072: StringTrimLeft,Haystack,Haystack,%nextpos%
073: if (match!="")
074: Result .= match . ","
077: }
...
071: foundpos:=regexmatch(haystack,"(?:[a-z0-9!#$%&'*+/=?^_{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_{|}~-]+)*|""(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*"")@(?:(
072: StringTrimLeft,Haystack,Haystack,%nextpos%
073: if (match!="")
074: Result .= match . ","
077: }
071: foundpos:=regexmatch(haystack,"(?:[a-z0-9!#$%&'*+/=?^_{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_{|}~-]+)*|""(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*"")@(?:(
072: StringTrimLeft,Haystack,Haystack,%nextpos% (0.95)
Code: Select all
071: foundpos:=regexmatch(haystack,"(?:[a-z0-9!#$%&'*+/=?^_{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_{|}~-]+)*|""(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*"")@(?:(
072: StringTrimLeft,Haystack,Haystack,%nextpos%
073: if (match!="")
074: Result .= match . ","
077: }
Code: Select all
---- scriptlocation\script.ahk
001: some code
002: some more code
004: you get the idea
020: all the stuff that came before the loop
069: Loop
---- Repeated: 743
071: foundpos:=regexmatch(haystack,"(?:[a-z0-9!#$%&'*+/=?^_{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_{|}~-]+)*|""(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*"")@(?:(
072: StringTrimLeft,Haystack,Haystack,%nextpos%
073: if (match!="")
074: Result .= match . ","
077: }
----
071: foundpos:=regexmatch(haystack,"(?:[a-z0-9!#$%&'*+/=?^_{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_{|}~-]+)*|""(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*"")@(?:(
072: StringTrimLeft,Haystack,Haystack,%nextpos% (0.95)
2.
In "Variables and the Contents" it shows much useful information. This and the other view are the only two I typically use. But I often find myself using the built-in variables (as do most people), such as "a_index" in my script (or a_screenwidth, or a_cursor, etc.). Now, there are tons of bulit-in variables, so it would be foolish to display them all. However, if a built-in variable ever gets called in a script, then I want to see its current value (even if it's not in the last line executed). If for example a script has
Code: Select all
Loop, 3
{
if (a_index = 2)
msgbox, I'm using a built-in variable in my script
}
return
Code: Select all
Local Variables for Function()
--------------------------------------------------
variable1[0 of 0]:
Global Variables (alphabetical)
--------------------------------------------------
variable2[1 of 3]: 0
Used Bulit-In Variables (alphabetical)
--------------------------------------------------
a_index[1 of 3]: 2
Code: Select all
Local Variables for Function()
--------------------------------------------------
variable1[0 of 0]:
Global Variables (alphabetical)
--------------------------------------------------
variable2[1 of 3]: 0
Used Bulit-In Variables (alphabetical)
--------------------------------------------------
a_index[0 of 3]: