AutoHotkey Community

It is currently May 26th, 2012, 3:16 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 131 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 9  Next
Author Message
 Post subject:
PostPosted: March 7th, 2009, 10:45 am 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
HotKeyIt wrote:
I had to include SetFormat,integer,D in ListBoxAdjustHSB+GetListBoxItem

Please use "SetFormat,FastInteger", please! Or else the program runs like a slug (it disables binary number caching)!
HotKeyIt wrote:
Includes also a Fix for SciTE4AutoHotkey toolbar

Where is the fix?

_________________
fincs
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 7th, 2009, 1:09 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Hi fincs, thanks for pointing to IntegerFast, I've updated above post :)

fincs wrote:
Where is the fix?

I like QuickMode (use on demand only so it is not running all the time)
But currently when you click on the AHKToolbar4SciTE using QuickMode (bQuickMode := True) TillaGoTo will not show up as SciTE4AutoHotkey is not active, so it does not work.
So here the fix:
Quote:
;Check if we're in quick mode
If bQuickMode {

;Check if Notepad++ is active
hNPP := WinActive(sActiveWindow)
If Not hNPP
If !WinActive("AHKToolbar4SciTE") {
ExitApp
} else {
WinActivate,%sActiveWindow%
hNPP:=WinExist(sActiveWindow)
}

If Not hNPP
ExitApp
bExitOnClose := True
Gosub SummonGUI
} Else bExitOnClose := False

+ after showing the GUI (line 186)
Code:
WinActivate, ahk_id %hGui%
    ControlFocus,, ahk_id %htxtSearch%

EDIT: + optional Position on the left side instead right
Code:
If bPosLeft
        Gui, Show, Hide AutoSize x5 y%iY%
    else
        Gui, Show, Hide AutoSize x%iX% y%iY%

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 7th, 2009, 7:12 pm 
Offline

Joined: July 30th, 2007, 11:32 pm
Posts: 581
HotKeyIt, I like your AnimateWindow function :D. But there are some annoying little problems with it. I don't think it's something with your function, but rather with the API itself because I had the same problems early on in the project when I tried to use the blend effect instead of manually fading in (like it is now).

What happens is that the TextBox doesn't have any border (when using the blend effect), which looks weird. This can however be remediated using WinSet, Redraw. And also, half the time, there's kind of a flicker at the end of the animation (no matter the effect). I'm not sure where it comes from, but I think it's just a side-effect of using the API. Although it is most noticeable when using the blend effect, it's also there in the other effects as well. The other small annoyance is that the process becomes uninterruptible, which means that pressing Escape while the animation is going will do nothing.

Also, I'm trying to understand why you added SetFormat in the ListBox functions. Is it supposed to be faster? Doesn't AutoHotkey cache the variables numerically by default? I also tried AnimateWindow without the SetFormat, and it worked fine.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 7th, 2009, 11:39 pm 
Offline

Joined: July 30th, 2007, 11:32 pm
Posts: 581
New release:
Quote:
- Greatly improved analysis speed for large scripts with big comment blocks
- Added bPosLeft (feature suggested by HotKeyIt)
- Added iMargin
- Made the default size a little wider and taller
- Changed default value of sActiveWindow to match both Notepad++ and SciTE4AutoHotkey
- Added the SciTE4AutoHotkey fix by HotKeyIt


About bPosLeft and iMargin:
Code:
iMargin  := 2      ;Specify the width of the GUI's margins.
bPosLeft := False  ;Set to True to position the GUI on the left side instead of the right side.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2009, 6:28 am 
Offline

Joined: July 30th, 2007, 11:32 pm
Posts: 581
New release:
Quote:
- Added bFilterComments
- Added SetBatchLines -1 to the algorithm to make it faster
- Improved even more the comment filtering algorithm to make it even faster (noticeable difference for big scripts)


About bFilterComments:
Usage wrote:
For extremely large scripts (> 5000 lines, especially with a lot of comments), performance can be enhanced by turning comment filtering off through bFilterComments (default is True). On the same note, you may turn the flag off anyways to improve performance if you're confident your comments do not contain function/label/hotkey-looking text that might get picked up during script analysis.

Code:
bFilterComments := True ;Set to True to filter out the functions/labels/hotkeys found in comments.
                        ;Note: this feature greatly reduces performance in large scripts. Therefore, if
                        ;you start experiencing lag, you might want to turn it off (at the expense of
                        ;not filtering out functions/labels/hotkeys found in comments).
                        ;Warning: if turned off, functions must not have comments between the closing
                        ;parenthesis of the declaration and the opening curly bracket. Similarly, labels
                        ;must not have comments on the same line.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2009, 12:44 pm 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
Feature request:
Can you process #include lines too? It shouldn't be that hard...
(Loop, RegExMatch, SubStr and FileRead) :3
(Oh, and StdLib too, if you want)

_________________
fincs
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2009, 5:24 pm 
Offline

Joined: July 30th, 2007, 11:32 pm
Posts: 581
fincs wrote:
Feature request:
Can you process #include lines too? It shouldn't be that hard...
(Loop, RegExMatch, SubStr and FileRead) :3
(Oh, and StdLib too, if you want)

If we were talking about an Intellisense system where the user needs to know all the functions he has access to, then I'd understand. But TillaGoto is only meant to help you go to different points in the script you're working on. Also, if the list includes both functions existent in the script, and functions part of an external file, the user will have a harder time distinguishing the two. Also, what should TillaGoto do when the user selects an external function? Should it open up the file and point the cursor to the line definition? That just feels like it's doing more than what it is designed to do.

The user could just open up both files and use TillaGoto in each of them. It just seems like a lot of work for a feature that feels like it's beyond the scope of the script's purpose.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2009, 5:59 pm 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
TheGood wrote:
fincs wrote:
Feature request:
Can you process #include lines too? It shouldn't be that hard...
(Loop, RegExMatch, SubStr and FileRead) :3
(Oh, and StdLib too, if you want)

If we were talking about an Intellisense system where the user needs to know all the functions he has access to, then I'd understand. But TillaGoto is only meant to help you go to different points in the script you're working on. Also, if the list includes both functions existent in the script, and functions part of an external file, the user will have a harder time distinguishing the two. Also, what should TillaGoto do when the user selects an external function? Should it open up the file and point the cursor to the line definition? That just feels like it's doing more than what it is designed to do.

The user could just open up both files and use TillaGoto in each of them. It just seems like a lot of work for a feature that feels like it's beyond the scope of the script's purpose.

Ah, ok ;)
I didn't know that that feature was so outside from the script's purpose...
Anyway, I'm bundling this with the next version of SciTE4AutoHotkey v2
(if the OS >= Windows XP, you know why) :)

_________________
fincs
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2009, 7:39 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
TheGood wrote:
Also, what should TillaGoto do when the user selects an external function? Should it open up the file and point the cursor to the line definition? That just feels like it's doing more than what it is designed to do.

The user could just open up both files and use TillaGoto in each of them. It just seems like a lot of work for a feature that feels like it's beyond the scope of the script's purpose.


I have been thinking about this as well and I think this feature would be freaking good :D

It would be great if the file would be opened and cursor would jump to the function.

This is my problem about splitting the scripts into several files. So I try to keep all functions and labels together.

This feature would be a great advance in this matter.

- SciTE already recognizes if the file is opened so when you reopen it, it would just activate the tab with that file. So this part is not the problem
- Functions included in another script could be shown Function(.\Tools\hotkeys.ahk) so very easy to recognize
- The only problem I can think of is how to find the file!?
--- for example #include ..\Tools\hotkeys.ahk
------ how could we get the working directory?!? file location + SetWorkingDir command..

@ TheGood - any chance you try it? I will help where I can.

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 9th, 2009, 6:41 pm 
Offline

Joined: July 30th, 2007, 11:32 pm
Posts: 581
HotKeyIt wrote:
@ TheGood - any chance you try it? I will help where I can.

Very well. If the two people who care about this script want it, then I'll do it. :D
I have a few other things to do right now, but I will attack the issue ASAP.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 9th, 2009, 7:11 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
TheGood wrote:
HotKeyIt wrote:
@ TheGood - any chance you try it? I will help where I can.

Very well. If the two people who care about this script want it, then I'll do it. :D
I have a few other things to do right now, but I will attack the issue ASAP.


That's awesome, I will be waiting for that great feature patiently :D :D :D

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 13th, 2009, 6:12 am 
Offline

Joined: July 30th, 2007, 11:32 pm
Posts: 581
New release:
Changelog wrote:
- Added iIncludeMode and sPathMatching for #Include file scanning and library files scanning (and opening)
- Removed MsgBoxes in HID_GetInputInfo() which would rarely occur
- Fixed a possible error for when WM_INPUT's handle expired

About iIncludeMode and sPathMatching:
Code:
iIncludeMode := 0 ;This setting affects the behaviour of TillaGoto when scanning for script
                  ;labels, functions and hotkeys in #Include files and library files. To turn
                  ;off the feature completely, specify 0. Otherwise, iIncludeMode can be any
                  ;combination of the following values:
                  ;0x00000001 - Scan #Include files
                  ;0x00000010 - Scan library directories files
                  ;0x00000100 - Retrieve functions upon scanning
                  ;0x00001000 - Retrieve labels upon scanning
                  ;0x00010000 - Retrieve hotkeys upon scanning
                  ;0x00100000 - Filter comments upon scanning (similar to bFilterComments)
                  ;0x01000000 - Recurse (ie. include #Include files of #Include files and so on)
                  ;0x10000000 - Append the name of the file to the functions/labels/hotkeys name
sPathMatching := "\*?.*(?= - (Notepad\+\+|SciTE4AutoHotkey))" ;Regular expression which should
                  ;match the path of the currently edited file. Necessary only if iIncludeMode <> 0.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 13th, 2009, 8:37 am 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
TheGood wrote:
Also, I'm trying to understand why you added SetFormat in the ListBox functions. Is it supposed to be faster? Doesn't AutoHotkey cache the variables numerically by default? I also tried AnimateWindow without the SetFormat, and it worked fine.

This was necessary for AutoHotkey < 1.0.48

I will now test new release :), thank you so much.

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 13th, 2009, 4:14 pm 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
It's finally here :D

_________________
fincs
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 13th, 2009, 4:41 pm 
Offline

Joined: July 30th, 2007, 11:32 pm
Posts: 581
Quick fix:
Changelog wrote:
- Fixed default value of sPathMatching and sActiveWindow so that it better matches SciTE/SciTE4AutoHotkey

:D


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 131 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 9  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 14 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group