Page 31 of 42

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 21 Sep 2016, 21:01
by TLM
Sorry for the late response but the original hosting site is back up.
http://fincs.ahk4.net/scite4ahk

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 22 Sep 2016, 06:49
by Tomer
Wonderful tool!
just to make sure, I got on about this ver info:
Version 3.0.06.01 - Based on SciTE 3.5.1
Built on Oct 12 2014 13:40:05
is it the latest version atm ?

Thanks!

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 22 Sep 2016, 07:15
by evilC
Yes, Fincs is not actively developing at the moment.

AHK-Studio is actively developed - it is a little rougher around the edges but has more in the way of functionality, such as hitting breakpoints in included files without having to set them after you start debugging, and automatically loading included files (ie a more "Project-oriented" UI).

I tend to use Scite for short script and snippet editing, and AHK Studio for large projects with lots of includes.

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 26 Sep 2016, 16:32
by evilC
I have been having a look at the S4AHK source with a mind to trying to make the breakpoints set in include files work without you having to manually re-toggle them each time you debug.


SciTEDebug.ahk, line 195 (PostMessage, 0x111, 1135, 0,, ahk_id %scitehwnd%) seems to cause a refresh of the breakpoints in the current tab.

Same file, line 535:

Code: Select all

InitBreakpoints:
for _, line in InitBkList
	SetBreakpoint(line)
InitBkList := ""
return
This seems to pass each breakpoint in the current tab to the debugger.
I tried modifying SetBreakpoint to specify lines in other files, and it can indeed set breakpoints in any file, so I see the mechanism to pass the info to the debugger, but unfortunately InitBkList only holds breakpoints for the current file, and InitBkList seems to be set by SciTEMsgHandler() receiving a message with wParam of 1. I know not what sends this message though. I thought it might be the PostMessage detailed above, and commenting out that PostMessage seems to stop InitBreakpoints being called, but the PostMessage is sending msg 0x111 not 0x1010, and does not appear to be passing a list of breakpoints, so there must be an intermediary step.

I managed to use the Scite Object to get a list of tabs, and tried switching to each tab at start of debug, and issuing the PostMessage whilst on each tab, but no dice.

Can anyone give me any pointers?

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 26 Sep 2016, 21:53
by lexikos
@evilC: I already have a fix for that, just haven't been motivated to share it.

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 27 Sep 2016, 02:36
by lexikos
evilC wrote:make the breakpoints set in include files work
See https://github.com/Lexikos/SciTE4AutoHo ... x-debugger
Commits of note:
  • Fix breakpoint initialization to use breakpoints from all files
  • Replace Stream Viewer with Output Pane

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 27 Sep 2016, 03:34
by aaffe
how to install your fix, lexikos please?

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 27 Sep 2016, 06:10
by evilC
Absolutely awesome, thanks lex

@aaffe
I downloaded a zip of the repo, extracted the source folder from the ZIP into the Scite folder, overwriting.
Then take the Unicode 32-bit AHK executable and place it in the SciTE folder, overwriting InternalAHK.exe

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 27 Sep 2016, 06:33
by evilC
@Lexikos:
Unfortunately, this fix doesn't seem to solve the issue when using dynamically included code eg using AHK_H's AddFile() command.
If you start debugging, then add the breakpoint into the dynamically included script, then run, it hits the breakpoint, so it does seem possible.

I had a look at the code, and I can't see why it fails when using AddFile(). SetBreakpoint() seems to get called with the breakpoints in the dynamically included file (it gets passed exactly the same things it seems as when you #include the file), it just doesn't hit the BP unless you add the BP after starting debugging.

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 27 Sep 2016, 21:39
by lexikos
That is not a problem that I was aiming to solve, as I do not use AutoHotkey_H. Breakpoints are set when the connection is made. You cannot set a breakpoint at a location which does not exist.

I suppose you can attach the debugger to the script after it calls AddFile.

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 28 Sep 2016, 05:25
by evilC
Yeah, that seems to work.
Not a huge deal though, my dynamic include code checks for the existence of the class before adding the script to the main file, so if I want to debug a plugin class, I can just add a static include.

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 06 Oct 2016, 16:42
by freespacing
EDIT: Just found the thread with themes... (Google.) Awesome!

The link to themes on the first page has gone dead.
Apart from the built-in themes, are there dark themes that some of you have made and would be willing to share?

Disabling all built-in hotkeys in SciTE4AutoHotkey

Posted: 07 Oct 2016, 07:49
by freespacing
I'm loving @joedf's PlasticCodeWrap theme.

One thing I'm not finding in the docs is how to disable built-in hotkeys.
Many of the hotkeys are interfering with my generic editor group hotkeys, making the switch-over a little rough.

Would someone know how to do that?
Cheers!

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 07 Oct 2016, 09:36
by joedf
It's a file called user.properties or something, look for settings in your toolbar. There are many *.properties files

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 07 Oct 2016, 11:15
by freespacing
Hi Joe, thank you for writing.
That's where I had looked -- all the property files under Options. Can't find any key bindings there.
There must be a way to turn off all the default bindings, right? They seem to get triggered before AHK.

EDIT: I have a feeling the hotkeys might be baked in. Don't know if I feel like going down the road of looking through the source code...

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 07 Oct 2016, 17:28
by lexikos
Which hotkeys?

If you update SciTE4AutoHotkey (manually) from GitHub, you can disable the default toolbar buttons and their corresponding hotkeys by creating a file called $NODEFTOOLBAR in the same directory as SciTEUser.properties. This removes all of the default buttons to the right of the run/debug buttons, but you can restore them by copying from the global toolbar.properties into your user toolbar.properties minus the hotkeys. The $NODEFTOOLBAR check was added by fincs in 2014 but not formally released.

To disable TillaGoto and its hotkeys, you can add tillagoto.enable=0 to your SciTEUser.properties.

For the debugger, I just remove the hotkeys (search SciTEDebug.ahk for ::) and implement my own externally. However, they're only active while debugging a script (you start debugging by clicking the green bug button on the toolbar).

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 07 Oct 2016, 17:29
by joedf
Are these relevant? Otherwise, I think you may be right :p

SciTEGlobal.properties

Code: Select all

# User defined key commands
user.shortcuts=\
Ctrl+Shift+V|IDM_PASTEANDDOWN|\
Ctrl+PageUp|IDM_PREVFILE|\
Ctrl+PageDown|IDM_NEXTFILE|\
KeypadPlus|IDM_EXPAND|\
KeypadMinus|IDM_BLOCK_COMMENT|\
Ctrl+F1|IDM_HELP_SCITE|
toolbar.properties

Code: Select all

=SmartGUI Creator (Ctrl+1)|%LOCALAHK% tools\SmartGUI\SmartGUI.ahk|^1|%ICONRES%,13
=MsgBox Creator (Ctrl+2)|%LOCALAHK% tools\MsgBoxC.ahk|^2|%ICONRES%,10
-
=TillaGoto|%LOCALAHK% tools\TillaGoto.ahk||%ICONRES%,16
=GenDocs Documentation Generator|%LOCALAHK% tools\GenDocs\GenDocs.ahk||%ICONRES%,15
=Scriptlet Utility (Ctrl+3)|%LOCALAHK% tools\SUtility.ahk|^3|%ICONRES%,11

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 07 Oct 2016, 17:36
by lexikos
joedf, the user.shortcuts are implemented by Scintilla, not by hotkeys, so they do not override the user's hotkeys. Of those, the only shortcuts I'd get rid of are KeypadPlus and KeypadMinus - none of the others are overriding some other function, afaik.

Btw...
freespacing wrote:They seem to get triggered before AHK.
Nope. The hotkeys I listed in my previous post are all implemented by AHK. ;)

If you use #UseHook and reload your script after starting SciTE, it's likely that your hotkeys will take over.

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 07 Oct 2016, 17:58
by joedf
lexikos wrote:joedf, the user.shortcuts are implemented by Scintilla, not by hotkeys, so they do not override the user's hotkeys.
Ahh okay, thanks. good to know :+1:

Re: SciTE4AutoHotkey v3.0.06.01 [Updated October 12 2014]

Posted: 08 Oct 2016, 05:32
by freespacing
@joedf, @lexikos
Thank you both so much for taking the time to walk me through this. I look scrupulously at everything you suggested (additional files, GitHub patch etc.) Good to know the main locations where these config are stored. SciTE is working perfectly for me now. :thumbsup:

But in fairness, I really must own up and admit, with great embarrassment, that I had placed SciTE twice in one of the ahk_groups involved, instead of once in each of the two. :oops: It's very likely that I wasted your time and that the shortcuts should have worked in the first place, as you hinted.

Thanks again.

Wishing you both a fun weekend.