AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Active GoTo v4
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Sun Aug 27, 2006 8:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
MsgBox
Guest





PostPosted: Sun Aug 27, 2006 10:52 pm    Post subject: Reply with quote

Hello Rajat

This thread is flying now. Laughing

Rajat wrote:
thanks for your kind words and review.

No problem, I just couldn't help myself. Smile

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. Smile

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! Sad

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

PostPosted: Mon Aug 28, 2006 7:15 am    Post subject: Reply with quote

Dear MsgBox,
Sidenote: you may consider to use "$*RButton::"
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Mon Aug 28, 2006 11:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Tue Aug 29, 2006 1:02 am    Post subject: Reply with quote

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
View user's profile Send private message
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Tue Aug 29, 2006 1:32 am    Post subject: Reply with quote

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
View user's profile Send private message
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Tue Aug 29, 2006 9:16 am    Post subject: Reply with quote

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
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3841
Location: Bremen, Germany

PostPosted: Tue Aug 29, 2006 9:27 am    Post subject: Reply with quote

Only change for german PSPad
GotoWin = Gehe zu...
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Thalon



Joined: 12 Jul 2005
Posts: 640

PostPosted: Tue Aug 29, 2006 9:43 am    Post subject: Reply with quote

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 Wink

I always prefere "FileRead" in combination with "Loop, Parse", because it is very fast in comparison Smile

Thx,
Thalon
_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum
SacredVault
Back to top
View user's profile Send private message
MsgBox
Guest





PostPosted: Tue Aug 29, 2006 11:12 am    Post subject: Reply with quote

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 Smile ) of my own. I don't read code fluently Sad , so it didn't jump out at me.
Back to top
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Tue Aug 29, 2006 9:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
Spike



Joined: 24 Jun 2005
Posts: 12

PostPosted: Wed Aug 30, 2006 4:39 am    Post subject: Reply with quote

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
View user's profile Send private message
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Wed Aug 30, 2006 7:29 am    Post subject: Reply with quote

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
View user's profile Send private message
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Wed Aug 30, 2006 7:33 am    Post subject: Reply with quote

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
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3841
Location: Bremen, Germany

PostPosted: Wed Aug 30, 2006 9:09 am    Post subject: Reply with quote

@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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 2 of 6

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group