just the first won't do that, AFAIK. but it definitely can be optimized, there's a bit of an overkill there. i'll repost.
What is the reason forCurrLine = %A_LoopField% Check = %CurrLine% Check = %Check%If you want to trim spaces away, wouldn't one of these lines have been enough.?!?
Active GoTo v4
This thread is flying now. :lol:
No problem, I just couldn't help myself.
thanks for your kind words and review.
I've updated the code with your change.
And thanks for clarifying the screenshot question. I thought that I was missing out on something.
I would like this too for the same reason. I tried to code it myself but failed!
I normally have multiple files open, so when I switch between files, I would like to see the list of sections for that file.
I have a request.
In some scripts (and especially my main one) the code looks similar to this:
$RButton:: $+RButton:: $+!RButton:: $+^RButton:: $+#RButton:: $+!^RButton:: $+!#RButton:: $+^#RButton:: $+!^#RButton:: $!RButton:: $!^RButton:: $!#RButton:: $!^#RButton:: $^RButton:: $^#RButton:: $#RButton:: Code is here. ReturnWould it be possible without breaking your code to check for occurances like this and limit the output to just the first hotkey? As you can imagine, it takes up a lot of room in the display and is not nessesary.
I think the current way is faster/more efficient because the "loop, parse" way reads the whole file at once and does everything else internal to ahk, which is very fast... while for the other way, for every script line, ahk will have to acquire the file's handle, open it, read the requested line and then close it.
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.
So everyone is welcome to post these parameters of your favourite editors here:
TitleStart = PSPad - [
TitleEnd = ]
GotoWin = Goto Line
GotoKey = ^g
this will also add auto support for german PSPad (as you requested), so please provide its values here as well.
I'll test it soon and if there are any suggestions I'll post them here, but I think toralf did already a good job
I always prefere "FileRead" in combination with "Loop, Parse", because it is very fast in comparison
Thank you very much Rajat.
I've updated the script.
- Auto update of list based on the currently open file in editor.
- Pressing F5 will refresh the list
I can't think of any more improvements that I would like to see atm, so for me it's perfect!
Thanks for your suggestion. I will make the changes.
Sidenote: you may consider to use "$*RButton::"
The script that that code came from is called NiftyWindows. I use it as my main script and have stripped out most of the code that I don't need and added some (alot ) of my own. I don't read code fluently , so it didn't jump out at me.
- The GUI doesn't need to recreate itself when showing a new file's sections or while refreshing.
- The script checks if the current file is a script (ahk or au3). so opening a .txt file in your editor, with ActiveGoto running, won't bring the GUI out.
As these are relatively small changes, i've not increased the version counter.
This script sounds like what I want!, but I cannot get it to run.
I'm using the latest build of PSPAD
I've changed :-
TitleStart = PSPad - [
to = PSPad
As that is all that is visible in the main titlebar & if I have a ahk file loaded , a child window shows C:\Download\activegoto.ahk
What do I put here TitleEnd = ??.
I've tried 'C:\Download\activegoto.ahk' but that doesn't work !!.
The PSPad window has to show the name of the file. Otherwise the script will not know which file you are working on.
@Rajat: The class might only be valid for PSPad. What about other editors?
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.