Active GoTo v4
v4 Changes:
- List Auto-Updates if there is a change in the sections (or their positions) in the script.
- The auto-update changes the order of the list ONLY if there is a change in the sections in the script,
and not if the change is only in their positions
- Support for hotstrings added
- Support for same line comments on section line added/improved
- If there are no sections in a file (eg. a new script), the ActiveGoTo window doesn't pop up.
- The hotkey Win+Tab toggles the gui hide/show. (Thanks toralf)
- The GUI only shows up when its hotkey is pressed, and not automatically (Thanks toralf)
- All Hotkeys context sensitive (Thanks toralf)
- The refresh hotkey (F5) is gone
- Removed support for .au3 scripts (Don't even know why I added that in the first place!)
v3 Changes:
- Auto update of list based on the currently open file in editor.
- Pressing F5 will refresh the list
- Check if the file open in editor is a script or not
v2 Changes:
- The ActiveGoto GUI gets hidden when neither it or Editor window are active (Thanks MsgBox)
- Support for OTB added (Thanks toralf)
- The alphabetical sort of function list is now optional (Thanks toralf)
- Hotkeys are now easily configurable (Thanks toralf)
- Some code optimizations
When you're working on a big script (say having 400-500 or maybe a couple of thousand lines) then what do you hate most? If you're like me then you hate scrolling from one part of the script to another the most... to counter that I'd made the bookmark script which remembered line contents so the bookmarks always worked (here). Though the advantage it had was that only the sections i wanted were bookmarked, the problem problem was that i still had to create those bookmarks. i didn't like that much either.
So that brings us to this script...
You run this script (preferably by a hotkey) and whatever the current script in your fav editor is, its instantly scanned and All Sections (including hotkey sections) and All Functions are presented as a sorted list of searchable bookmarks!!.. just select the section and press enter.(if you've used my 320MPH script then you'll find yourself at home).
A handy feature is Win+Left key to travel directly between last two used sections without using the ActiveGoto GUI.
Another very helpful feature is that when the script starts it presents a sorted list of sections, but as you keep using it, the recently traversed sections are moved to the top of the list, to make them easily accessible the next time.
Keyboard Help:
Win + Tab : Show Active Goto Window
Win + Left : Goto last browsed control
Esc : Hide Active Goto Window
Up/Down : Browse section list
Its set for PSPad but you can change it to whatever editor you like, it has just 2 reqmts:
- Editor must have a Goto Line cmd
- Editor window's title shows file path
Except Notepad probably every editor has those!
I've been using this for a while and it now is a necessity for me while scripting. (imagine that the current SGUI has about 100 sections!)
(screenshot from Rubberduck's script)
DOWNLOAD
CleanNews.in : Bite sized latest news headlines from India with zero bloat
WHAT! Three days, 77 views and nobody has left a comment for this brilliant script! Disgraceful, thats what I say.
Thanks Rajat.
Navigation in PSPad is so much easier now.
I made a small change (to suit my personal preference!), and that is to hide the gui when PSPad is not active. If you don't mine, I will post it here.
EWCheck: IfWinNotExist, ahk_id %EWID%,, ExitApp ; Hide if editor is not active. IfWinNotActive ahk_id %MWID% { IfWinNotActive ahk_id %EWID% DllCall( "AnimateWindow", "Int", MWID, "Int", 300, "Int", 0x00050002 ) } Return
On ANY script large OR small that requires you to scroll, this is useful! (IMHO)When you're working on a big script (say having 400-500 or maybe a couple of thousand lines) then what do you hate most? If you're like me then you hate scrolling from one part of the script to another the most...
Do you mean a script that create's screen shots? If so, I can't find it!(screenshot from Rubberduck's script)
I missed your post, until MagBox revived it. Thank you to you both.
I have already two requests:
1) I'm a fan of OTB, could you extend the script for these?
2) I like to order my labels/subroutines. So it would help me to have the labels in the GUI in the order they are in the file. To be able to switch between the alphabetic and ordered list, I would like to have ListView Control. But I guess in that case the "recently traversed sections are moved to the top of the list" will not work anymore.
toralf
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.
1) My windows is german, so PSPads GoTo window is called "Gehe zu..." Maybe you could make it set that depending on the "A_Language"?
2) My notebook doesn't have a win key, could you change the script to easily modify the hotkeys? I used Ctrl instead of Win
toralf
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.
I have been using EditPlus for the same reason. It already has this feature built-in....but when working with other editors your script is really helpful.
Nice effort...Thanks
- The ActiveGoto GUI gets hidden when neither it or Editor window are active (Thanks MsgBox)
- Support for OTB added (Thanks toralf)
- The alphabetical sort of function list is now optional (Thanks toralf)
- Hotkeys are now easily configurable (Thanks toralf)
- Some code optimizations
hi MsgBox,
thanks for your kind words and review. I've updated the code with your change.
toralf,
I've done all the changes you requested except the language change, as that'll still add support for only PSPad, while for anyone who doesn't use the default english PSPad installation, he has only a li'l change to doin the config section at script's top only once (whether for another language or for another editor).
CleanNews.in : Bite sized latest news headlines from India with zero bloat
toralf
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.
no, i just meant that the script whose sections ActiveGoto is showing in the screenshot is made by Rubberduck (i had it open at that time and i grabbed a screenshot from there)Do you mean a script that create's screen shots? If so, I can't find it!
by the way, when i made it initially, it had support for au3 scripts' sections as well... i've not re-checked it lately, though it probably still does support them.
CleanNews.in : Bite sized latest news headlines from India with zero bloat
toralf
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.
CleanNews.in : Bite sized latest news headlines from India with zero bloat
yeah that's true... currently re-loading ActiveGoto is the only way. i guess i should make it so that when a section is selected to be opened, it should re-scan the whole file to find its new position... might make it a little slower but would be accurate... what do you think?When I work on my code a lot and the line numbers change, the label names change, how can I refresh the list?
CleanNews.in : Bite sized latest news headlines from India with zero bloat
At the same time it could be monitored, if the file (window title) changes. I normally have multiple files open, so when I switch between files, I would like to see the list of sections for that file.
It also came to my mind, that your script will not recognize PSPad, when there is no file open. Then the title is "PSPad", but I guess that is rare.
Your script reads the whole file and "loop,parse" through the var. Is that faster then "loop,read" through the file? Since you want to have this operation fast, I guess this loop should be speed optinized as much as possible. E.g. make the file type decision outside of that loop. etc.
toralf
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.
CurrLine = %A_LoopField% Check = %CurrLine% Check = %Check%If you want to trim spaces away, wouldn't one of these lines have been enough.?!?
toralf
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.
CleanNews.in : Bite sized latest news headlines from India with zero bloat
#IfWinActive, ahk_group MWGrp Up:: ControlSend, ListBox1, {Up}, %MainWnd% Down:: ControlSend, ListBox1, {Down}, %MainWnd% #IfWinActive
toralf
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.