Page 20 of 42

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

Posted: 10 May 2015, 21:31
by dsewq1LYJ
lexikos wrote:"C:\Program Files\AutoHotkey\.." is not the AutoHotkey directory. It is the parent directory; i.e. Program Files.
But how to tell the SciTE where my AHK is?

I keep editing the AutoHotkeyDir of ahk.properties but it didnt work.

Is me misunderstood somethin' !?
My autohotkey is exactly in C:\Program Files\AutoHotkey\AutoHotkey.exe.

Pardon me.I am so bad on this : [

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

Posted: 10 May 2015, 21:58
by lexikos
For a start, you can try giving it the right path, by removing the part I highlighted in red. :roll:

Personally, I would just install the non-portable version.

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

Posted: 10 May 2015, 22:16
by dsewq1LYJ
lexikos wrote:For a start, you can try giving it the right path, by removing the part I highlighted in red. :roll:

Personally, I would just install the non-portable version.
Holy jesus.lexikos god :trollface:
:thumbup:

It work like a charm !
:crazy:

Thank you so much the GOD :D

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

Posted: 24 May 2015, 05:52
by sntr
Can't find anything useful in the web:

When i start there is the message:

Toolbar.ahk

Error: "2" is not a valid key name.
...
---> 273: Hotkey,Tools[A_Index].Hotkey,ToolHotkeyHandler
...

After closing scite4ahk the InternalAHK.exe remains in the process list and i have to stop it manually because the ahk toolbar doesn't show up on the next start.

Toolbar functions do not work: Start/Debug; the GuiCreator shows the message: "Cannot find Scite".

I tried to reinstall, install scite (no toolbar at all), searched a bit in the properties but no result yet.

Would be nice to have some help.

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

Posted: 24 May 2015, 10:31
by BGM
The new installer 3.0.06.01 won't let me uncheck the "Create shortcuts in the Start menu" and "Create a shortcut in the Desktop". The items are grayed out.

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

Posted: 04 Jun 2015, 13:27
by dangerdogL2121
Hi,
I just tried SciTE for the first time and it looks great. :P

One thing that I think would make it even better is when clicking on a Gosub, Goto, or a function and a key is pressed (such as control or shift), the edit box jumps to the target label or function. It would make for easier script navigation.

thanks

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

Posted: 04 Jun 2015, 13:33
by boiler
Have you checked out the TillaGoto feature? It's what you're describing and more.

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

Posted: 04 Jun 2015, 16:32
by dangerdogL2121
Thanks so much, that's just what I was looking for! :D

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

Posted: 16 Jun 2015, 07:38
by Flipeador
esto?
--> %AHKPATH%\Template.ahk
--> HKCR\.ahk\ShellNew\FileName

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

Posted: 16 Jun 2015, 09:51
by joedf
sort of... ;)

Just modify this file:
C:\Windows\SHELLNEW\Template.ahk

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

Posted: 05 Aug 2015, 09:28
by Darias
Update SciTE 3.6.0 .zip | x86.msi | x64.msi

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

Posted: 05 Aug 2015, 13:43
by fincs
Using vanilla versions of the SciTE/Scintilla binaries with SciTE4AutoHotkey is not supported and will result in several functionality breaking, amongst them AutoHotkey syntax highlighting. Please stay patient - yesterday I integrated the SciTE4AutoHotkey modifications into the latest version of SciTE/Scintilla (3.6.0).

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

Posted: 09 Aug 2015, 04:30
by StefOnSteroids
Setting the BG-Color for TillaGoto doesn't seem to work, or I don't know what color code is expected here?

Where do I find a list of commands like IDM_PASTEANDDOWN that allow assigning a key shortcut to them?

Have spent an hour here in the forum but I am still confused about the many path-variables that I come across.
%SCITEDIR% vs $(SciteDefaultHome) vs $(SciteUserHome) etc

When to use what in which config-file, but most importantly how to set them up properly. Some functions are not working (such as Ctrl 7 Compile) and I assume it's because of wrong paths. I run the program from \Toolbox\ahk\SciTE from where it seems to correctly find my portable ahk (\Toolbox\ahk) but not the help file and not \Toolbox\ahk\Compile\Ahk2Exe.exe ...

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

Posted: 09 Aug 2015, 11:04
by evilC
Is it possible to allow debug breakpoints to work when they are in other files?
At the moment, I can step into other files (even if they aren't currently open), but if the breakpoint itself is in a file other than the one you hit "Play" on, then it does not break at the breakpoint.

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

Posted: 09 Aug 2015, 18:11
by fincs
StefOnSteroids wrote:Setting the BG-Color for TillaGoto doesn't seem to work, or I don't know what color code is expected here?
Haven't tried it myself, but I believe it is a normal RRGGBB code as usually interpreted by AutoHotkey.
StefOnSteroids wrote:Where do I find a list of commands like IDM_PASTEANDDOWN that allow assigning a key shortcut to them?
You may want to take a look at CommandValues.html.
StefOnSteroids wrote:Have spent an hour here in the forum but I am still confused about the many path-variables that I come across.
%Variables% only work in toolbar property files. $(Variables) only work in SciTE property files. SciteDefaultHome is the path to the SciTE.exe binary. SciteUserHome is the path to the user settings folder (My Documents\AutoHotkey\SciTE in the normal/installable version, SciteDefaultHome\user in the portable version).
StefOnSteroids wrote:When to use what in which config-file, but most importantly how to set them up properly. Some functions are not working (such as Ctrl 7 Compile) and I assume it's because of wrong paths. I run the program from \Toolbox\ahk\SciTE from where it seems to correctly find my portable ahk (\Toolbox\ahk) but not the help file and not \Toolbox\ahk\Compile\Ahk2Exe.exe
The portable version expects this setup:

Code: Select all

- AutoHotkey.exe
- AutoHotkey.chm
- Compiler
  - Ahk2Exe.exe
- SciTE (or any other name)
  - SciTE.exe
Note how you missed the r in Compiler.
evilC wrote:Is it possible to allow debug breakpoints to work when they are in other files?
At the moment, I can step into other files (even if they aren't currently open), but if the breakpoint itself is in a file other than the one you hit "Play" on, then it does not break at the breakpoint.
Yes, but due to limitations you have to set the breakpoint after you have launched the debugger. After debugging is finished, close all files other than the main script in order to clear their breakpoints.

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

Posted: 10 Aug 2015, 00:56
by StefOnSteroids
Many thanks,
the puzzle pieces have fallen into place. I am especially grateful for the hint with the missing r of "CompileR" - I probably would have never spotted that.

Color codes work as well. Beats me why it didn't work before, I thought I had tried everything.

ATM I am fiddling with toolbar properties. On my hi-resolution monitor those tiny icons are tough on the eyes, almost impossible to operate. I managed to get all font sizes increased, but not the icons. Any chance to replace them with a larger set? 24 or 32px?

Figured out the tools-part. But how do I configure the built-in features? Seems like the CommandValues.html you provided (thanks for that, too) would be the key to it. But I am still struggling to pull it off.

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

Posted: 14 Aug 2015, 15:04
by WAZAAAAA
Since there's no tool or function available to instantly clean an entire messy AutoHotkey script (at least not anymore, Auto-Syntax-Tidy is outdated), I've decided to make one... more or less.
Basically, this script takes your ugly looking script and manually rewrites it all into SciTE (which will apply a proper syntax/indentation) with SendRaw. Yes, it's THAT cheap... and actually works great, it doesn't even need to be updated haha. In my defense, I've spent a while figuring out that reading a direct file is a better option than dealing with escape characters lol.

INSTRUCTIONS:
1. Disable the auto-complete. This is important, otherwise the script may get corrupted. To disable it, I renamed ahk.api to bla.api and restarted SciTE;
2. Make sure that ugly.ahk (your own script that needs to be cleaned) and the following script (AHK-Cheap-Syntax-Tidy.ahk) are in the same folder;
3. Finally hit F11 while inside SciTE4AutoHotkey to start the rewrite.

Code: Select all

;IMPORTANT: before use, disable SciTE4AutoHotkey's autocomplete
F11::
FileRead, CONTENT, *t ugly.ahk
SendInput {Raw}%CONTENT%
EXAMPLE USAGE:
Image

Shout-outs to joedf for his great "PlasticCodeWrap" theme I used in the GIF (except with black background). Also to Klaus2 for the example script (though I don't actually use it). And obviously fincs.

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

Posted: 14 Aug 2015, 18:40
by joedf
;)

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

Posted: 14 Aug 2015, 18:55
by geek
@WAZAAAAA

I use the AutoIndent code from AHK Studio. Since AHK Studio is actually written in AHK, it makes it a simple matter to pluck out the indenter.

Here's his original code though it's been updated a bit since I did this, and here's my version of it I use for my code tester:

Code: Select all

AutoIndent(Code, Indent = "`t", Newline = "`r`n")
{
	IndentRegEx =
	( LTrim Join
	Catch|else|for|Finally|if|IfEqual|IfExist|
	IfGreater|IfGreaterOrEqual|IfInString|
	IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|
	IfNotExist|IfNotInString|IfWinActive|IfWinExist|
	IfWinNotActive|IfWinNotExist|Loop|Try|while
	)
	
	; Lock and Block are modified ByRef by Current
	Lock := [], Block := []
	ParentIndent := Braces := 0
	ParentIndentObj := []
	
	for each, Line in StrSplit(Code, "`n", "`r")
	{
		Text := Trim(RegExReplace(Line, "\s;.*")) ; Comment removal
		First := SubStr(Text, 1, 1), Last := SubStr(Text, 0, 1)
		FirstTwo := SubStr(Text, 1, 2)
		
		IsExpCont := (Text ~= "i)^\s*(&&|OR|AND|\.|\,|\|\||:|\?)")
		IndentCheck := (Text ~= "iA)}?\s*\b(" IndentRegEx ")\b")
		
		if (First == "(" && Last != ")")
			Skip := True
		if (Skip)
		{
			if (First == ")")
				Skip := False
			Out .= Newline . RTrim(Line)
			continue
		}
		
		if (FirstTwo == "*/")
			Block := [], ParentIndent := 0
		
		if Block.MinIndex()
			Current := Block, Cur := 1
		else
			Current := Lock, Cur := 0
		
		; Round converts "" to 0
		Braces := Round(Current[Current.MaxIndex()].Braces)
		ParentIndent := Round(ParentIndentObj[Cur])
		
		if (First == "}")
		{
			while ((Found := SubStr(Text, A_Index, 1)) ~= "}|\s")
			{
				if (Found ~= "\s")
					continue
				if (Cur && Current.MaxIndex() <= 1)
					break
				Special := Current.Pop().Ind, Braces--
			}
		}
		
		if (First == "{" && ParentIndent)
			ParentIndent--
		
		Out .= Newline
		Loop, % Special ? Special-1 : Round(Current[Current.MaxIndex()].Ind) + Round(ParentIndent)
			Out .= Indent
		Out .= Trim(Line)
		
		if (FirstTwo == "/*")
		{
			if (!Block.MinIndex())
			{
				Block.Push({ParentIndent: ParentIndent
				, Ind: Round(Lock[Lock.MaxIndex()].Ind) + 1
				, Braces: Round(Lock[Lock.MaxIndex()].Braces) + 1})
			}
			Current := Block, ParentIndent := 0
		}
		
		if (Last == "{")
		{
			Braces++, ParentIndent := (IsExpCont && Last == "{") ? ParentIndent-1 : ParentIndent
			Current.Push({Braces: Braces
			, Ind: ParentIndent + Round(Current[Current.MaxIndex()].ParentIndent) + Braces
			, ParentIndent: ParentIndent + Round(Current[Current.MaxIndex()].ParentIndent)})
			ParentIndent := 0
		}
		
		if ((ParentIndent || IsExpCont || IndentCheck) && (IndentCheck && Last != "{"))
			ParentIndent++
		if (ParentIndent > 0 && !(IsExpCont || IndentCheck))
			ParentIndent := 0
		
		ParentIndentObj[Cur] := ParentIndent
		Special := 0
	}
	
	if Braces
		throw Exception("Segment Open!")
	
	return SubStr(Out, StrLen(Newline)+1)
}

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

Posted: 18 Aug 2015, 17:37
by Heezea
Hey all, is there a way to make it so pressing one button will comment each line and pressing a different button will un-comment each line?

Currently, the same button performs both commenting and un-commenting, which I find annoying since sometimes I comment things out (says lines 2-3) when I'm testing, then want to comment out a larger block (say lines 1-7). Now Lines 1, 4, 5, 6, 7 become commented while lines 2, 3 are uncommented. I'd prefer to have lines 2, 3 be double commented and the other lines be single commented.

I checked http://www.scintilla.org/SciTEDoc.html and http://www.scintilla.org/CommandValues.html but no luck.

Also tried adjusting the items below, but no luck either.

Code: Select all

KeypadMinus|IDM_BLOCK_COMMENT|\
#~ KeypadMinus|IDM_BOX_COMMENT|\
#~ KeypadMinus|IDM_STREAM_COMMENT|\