| View previous topic :: View next topic |
| Author |
Message |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Sun Aug 27, 2006 8:24 pm Post subject: |
|
|
| toralf wrote: | What is the reason for | Code: | CurrLine = %A_LoopField%
Check = %CurrLine%
Check = %Check%
| If you want to trim spaces away, wouldn't one of these lines have been enough.?!? |
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. _________________
 |
|
| Back to top |
|
 |
MsgBox Guest
|
Posted: Sun Aug 27, 2006 10:52 pm Post subject: |
|
|
Hello Rajat
This thread is flying now.
| Rajat wrote: | | thanks for your kind words and review. |
No problem, I just couldn't help myself.
| Rajat wrote: | | I've updated the code with your change. |
Thank you.
And thanks for clarifying the screenshot question. I thought that I was missing out on something.
| toralf wrote: | | 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 would like this too for the same reason. I tried to code it myself but failed!
I have a request.
In some scripts (and especially my main one) the code looks similar to this:
| Code: | $RButton::
$+RButton::
$+!RButton::
$+^RButton::
$+#RButton::
$+!^RButton::
$+!#RButton::
$+^#RButton::
$+!^#RButton::
$!RButton::
$!^RButton::
$!#RButton::
$!^#RButton::
$^RButton::
$^#RButton::
$#RButton::
Code is here.
Return |
Would 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. |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Mon Aug 28, 2006 7:15 am Post subject: |
|
|
Dear MsgBox,
Sidenote: you may consider to use "$*RButton::" _________________ Ciao
toralf  |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Mon Aug 28, 2006 11:30 pm Post subject: |
|
|
| MsgBox wrote: | | This thread is flying now. |
all thanks to you!
and toralf, you're right again about the hotkey simplification thing! _________________
 |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Tue Aug 29, 2006 1:02 am Post subject: |
|
|
| toralf wrote: | | 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. |
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. _________________
 |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Tue Aug 29, 2006 1:32 am Post subject: |
|
|
I've updated the script.
v3 Changes:
- Auto update of list based on the currently open file in editor.
- Pressing F5 will refresh the list _________________
 |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Tue Aug 29, 2006 9:16 am Post subject: |
|
|
I'm planning to add some sort of editor detection at the launch of script so that users don't have to modify the code for that for most editors.
So everyone is welcome to post these parameters of your favourite editors here:
TitleStart = PSPad - [
TitleEnd = ]
GotoWin = Goto Line
GotoKey = ^g
toralf,
this will also add auto support for german PSPad (as you requested), so please provide its values here as well. _________________
 |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Tue Aug 29, 2006 9:27 am Post subject: |
|
|
Only change for german PSPad
GotoWin = Gehe zu... _________________ Ciao
toralf  |
|
| Back to top |
|
 |
Thalon
Joined: 12 Jul 2005 Posts: 640
|
Posted: Tue Aug 29, 2006 9:43 am Post subject: |
|
|
I did recognize this usefull tool today and I like it very much (but haven't tried it ^^).
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
Thx,
Thalon _________________ AHK-Icon-Changer
AHK-IRC
deutsches Forum
SacredVault |
|
| Back to top |
|
 |
MsgBox Guest
|
Posted: Tue Aug 29, 2006 11:12 am Post subject: |
|
|
| Rajat wrote: | I've updated the script.
v3 Changes:
- Auto update of list based on the currently open file in editor.
- Pressing F5 will refresh the list |
Thank you very much Rajat.
I can't think of any more improvements that I would like to see atm, so for me it's perfect!
@toralf
| Quote: | | Sidenote: you may consider to use "$*RButton::" |
Thanks for your suggestion. I will make the changes.
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. |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Tue Aug 29, 2006 9:33 pm Post subject: |
|
|
I've updated the script with these changes:
- 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. _________________
 |
|
| Back to top |
|
 |
Spike
Joined: 24 Jun 2005 Posts: 12
|
Posted: Wed Aug 30, 2006 4:39 am Post subject: |
|
|
Hi Guys,
This script sounds like what I want!, but I cannot get it to run.
I'm using the latest build of PSPAD
(2234).
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 !!.
Help please.
Thanks
Jan |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Wed Aug 30, 2006 7:29 am Post subject: |
|
|
Spike,
its ready to be used for PSPad as it is... try running it without any change. _________________

Last edited by Rajat on Wed Aug 30, 2006 7:35 am; edited 1 time in total |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Wed Aug 30, 2006 7:33 am Post subject: |
|
|
In another post Rabiator gave the idea of using 'GotoWin = ahk_class TfGotoLine' for PSPad, and I've modified the script to use this. No I hope it'll run on both of our systems without any changes! _________________
 |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Wed Aug 30, 2006 9:09 am Post subject: |
|
|
@Spike:
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? _________________ Ciao
toralf  |
|
| Back to top |
|
 |
|