SciTE4AutoHotkey v3.1.0

The popular SciTE-based AutoHotkey Script Editor
aaffe
Posts: 192
Joined: 16 Jan 2014, 04:23

Re: SciTE4AutoHotkey v3.1.0

Post by aaffe » 14 Jun 2022, 01:37

Intellisense doesnt work for me in the new version. Is there an option for it please?

autocart
Posts: 214
Joined: 12 May 2014, 07:42

Re: SciTE4AutoHotkey v3.1.0

Post by autocart » 20 Jun 2022, 18:09

fincs wrote:
18 May 2022, 14:08
babaviz wrote:Dear Fincs! You are a big and amateur fan of AHK! So far I have been using SciTEAHK with a dark background, but since installing SciTE4AutoHotkey Version 3.1.00 (May 18, 2022), the style settings do not work. Lest at least I can't darken the background.
I'm not an experienced programmer and a forumer, could I have messed up something during the installation? Is there a solution for this?
The easiest way to recover from unreliable settings is to rename or delete the %A_MyDocuments%\AutoHotkey\SciTE folder and start S4AHK again. This will apply a fresh new user profile. You can use the built-in Dark style too. (Don't forget to hit the "Update" button!)
Does not work for me. I still have the same problem as babaviz.

aaffe
Posts: 192
Joined: 16 Jan 2014, 04:23

Re: SciTE4AutoHotkey v3.1.0

Post by aaffe » 21 Jun 2022, 01:13

hy fincs,
Intellisense still doesnt work for me like in the old version. Can I fix this by myself, please?

ILoveAHK
Posts: 7
Joined: 15 Mar 2016, 17:19

Re: SciTE4AutoHotkey v3.1.0

Post by ILoveAHK » 20 Jul 2022, 07:30

I love SciTe for AHK. Thank you!
The only thing I miss from other IDE is going to last location. That essentially adds hidden bookmarks for every line location you have been and let you go back usually by alt+left or alt+right (). In visual studio it's Ctrl + minus and Ctrl+Shift+minus. This is very powerful feature as we can easily trace back where we have been and also quickly go where we were just little ago.

Is it possible to add this feature? Considering SciTe already have explicit bookmarks, this should be feasible. Of course, I can use booksmarks till then :)

lsramos
Posts: 3
Joined: 29 Jul 2022, 08:23

Re: SciTE4AutoHotkey v3.1.0

Post by lsramos » 29 Jul 2022, 08:56

Shurr wrote:
28 May 2022, 13:07
I have a persistent script which once an hour runs another script. With this new version, SciTE activates once an hour. It also opens the other script ...
My experience is essentially the same. If I run a script that calls another script, rather than running the script, it just opens it in Scite4AHK (scripts that call functions work fine). Tried deleting ...\Documents\AutoHotkey\SciTE but that had no effect. Hope someone has another suggestion for fixing this behavior.

If I cannot discover a workaround, will be forced to revert to v 3.0. Too bad because I love some of the new features, esp. how it remembers breakpoints in functions.

User avatar
JnLlnd
Posts: 487
Joined: 29 Sep 2013, 21:29
Location: Montreal, Quebec, Canada
Contact:

Re: SciTE4AutoHotkey v3.1.0

Post by JnLlnd » 29 Jul 2022, 09:29

lsramos wrote:
29 Jul 2022, 08:56
Shurr wrote:
28 May 2022, 13:07
I have a persistent script which once an hour runs another script. With this new version, SciTE activates once an hour. It also opens the other script ...
My experience is essentially the same. If I run a script that calls another script, rather than running the script, it just opens it in Scite4AHK (scripts that call functions work fine).
Could it be that when installing the new version of SciTE4AutoHotkey, the extension .ahk was associated to the editor instead of being associated with AutoHotkey.exe?

Right click on an .ahk file and check Open With, Choose Default Program.
:thumbup: Author of freeware Quick Access Popup, the powerful Windows folders, apps and documents launcher!
:P Now working on Quick Clipboard Editor
:ugeek: The Automator's Courses on AutoHotkey

lsramos
Posts: 3
Joined: 29 Jul 2022, 08:23

Re: SciTE4AutoHotkey v3.1.0

Post by lsramos » 29 Jul 2022, 17:59

JnLlnd wrote:
29 Jul 2022, 09:29
lsramos wrote:
29 Jul 2022, 08:56
Shurr wrote:
28 May 2022, 13:07
I have a persistent script which once an hour runs another script. With this new version, SciTE activates once an hour. It also opens the other script ...
My experience is essentially the same. If I run a script that calls another script, rather than running the script, it just opens it in Scite4AHK (scripts that call functions work fine).
Could it be that when installing the new version of SciTE4AutoHotkey, the extension .ahk was associated to the editor instead of being associated with AutoHotkey.exe?

Right click on an .ahk file and check Open With, Choose Default Program.
Thanks JnLlnd, that solved the problem. Happy to be returning to v3.1.0!

kaiserwilli
Posts: 3
Joined: 01 Aug 2022, 15:59

Re: SciTE4AutoHotkey v3.1.0

Post by kaiserwilli » 01 Aug 2022, 16:05

This is a great update. I had given up on any new updates coming out after so many years.
Thanks for all the work that went into this.

I'm using it as the portable installation. I had to delete the previous "SciTE" folder completely and replace it with the new one because of some problems when I just copied the installation over the previous folder. Hope that helps anyone else that might have that problem.

b0dhimind
Posts: 18
Joined: 20 May 2015, 11:41

Re: SciTE4AutoHotkey v3.1.0

Post by b0dhimind » 04 Aug 2022, 19:12

A bug is after updating I get a warning that there is a new update every time I startup Scite (even though I am already on 3.1.0). I had to disable the auto-update check in the global properties.

jly
Posts: 89
Joined: 30 Sep 2020, 06:06

Re: SciTE4AutoHotkey v3.1.0

Post by jly » 07 Sep 2022, 07:09

@fincs
hello ,fincs:

Can I have a look at the c++ code of your new lexer and the corresponding parameter configuration?

I'm not familiar with c++, I wrote my own lexer with reference to LexAHKL of RaptorX and Notepad3 for Scintilla 5.3.0.
Notepad3
https://github.com/rizonesoft/Notepad3/tree/master/lexilla/lexers_x
RaptorX/LexAHKL
https://github.com/RaptorX/LexAHKL

I have encountered some problems as follows:
1 Setting code folding parameters always fails and has to be hard-coded in the lexer C++ code .
It is: Sci.SetProperty("fold", "1") and Sci.SetProperty("fold.compact", "0")

2 After compiling to 64 version dll, clicking on the folding sign did not respond. 32 bit is normal

jly
Posts: 89
Joined: 30 Sep 2020, 06:06

Re: SciTE4AutoHotkey v3.1.0

Post by jly » 07 Sep 2022, 07:18

jly wrote:
07 Sep 2022, 07:09
@fincs
hello ,fincs:

Can I have a look at the c++ code of your new lexer and the corresponding parameter configuration?

I'm not familiar with c++, I wrote my own lexer with reference to LexAHKL of RaptorX and Notepad3 for Scintilla 5.3.0.
Notepad3
https://github.com/rizonesoft/Notepad3/tree/master/lexilla/lexers_x
RaptorX/LexAHKL
https://github.com/RaptorX/LexAHKL

I have encountered some problems as follows:
1 Setting code folding parameters always fails and has to be hard-coded in the lexer C++ code .
It is: Sci.SetProperty("fold", "1") and Sci.SetProperty("fold.compact", "0")

2 After compiling to 64 version dll, clicking on the folding sign did not respond. 32 bit is normal

In SciTE4AutoHotkey-master\scipatches\lexilla.diff, I see the corresponding code !

Nucleorion
Posts: 50
Joined: 11 Dec 2016, 11:33

Re: SciTE4AutoHotkey v3.1.0

Post by Nucleorion » 23 Sep 2022, 07:09

Congratulations on the program. I have a problem with the new version, variables and functions are not colored, before the code was more readable, but with version 3.1 everything is black. I have tried to edit the style but there is no longer a section for variables and functions. Before they were colored by default. I think it is something that should be recovered.

I have also had to disable the display of tabs since the lines were displayed in certain circumstances like this

Image

The blank lines have no tabulation but the marks appear

smbs
Posts: 98
Joined: 27 Feb 2014, 11:07

Re: SciTE4AutoHotkey v3.1.0

Post by smbs » 25 Sep 2022, 05:10

After update not getting command switches
After typing FileCopy, I used to be shown the possible format options --- SourcePattern, DestPattern [, Overwrite]
In latest version nothing shows up. Is it me?
Thanx

gregster
Posts: 8916
Joined: 30 Sep 2013, 06:48

Re: SciTE4AutoHotkey v3.1.0

Post by gregster » 25 Sep 2022, 07:02

smbs wrote:
25 Sep 2022, 05:10
After update not getting command switches
After typing FileCopy, I used to be shown the possible format options --- SourcePattern, DestPattern [, Overwrite]
In latest version nothing shows up. Is it me?
No, everyone.
https://www.autohotkey.com/boards/viewtopic.php?f=61&t=104086#p462258 wrote:Known issues:
Calltip functionality has been temporarily removed as a side effect of the new syntax definition autogeneration, as well as SciTE limitations.

User avatar
AutomaticAlex
Posts: 1
Joined: 15 Dec 2022, 15:39

Re: SciTE4AutoHotkey v3.1.0

Post by AutomaticAlex » 15 Dec 2022, 15:51

@fincs The help file lookup issue can probably be solved by incorporating something like how CodeQuickTester does it.
It's very old, but can still perform lookups in the newer .CHM file.

ahketype
Posts: 191
Joined: 27 Oct 2016, 15:06
Location: Yorkshire, UK

Re: SciTE4AutoHotkey v3.1.0

Post by ahketype » 20 Dec 2022, 08:39

@fincs - I really miss the Calltips function. Is this likely to be replaced or fixed in future? It's such a great feature. In the meantime, I'll have to revert to 300601 from https://www.autohotkey.com/scite4ahk/dl/

It's ironic - I've always cursed the calltips because there was no way to remove them or make them only pop up manually on a hotkey, and they were damn persistent, sometimes popping back up again in the same line. And now they're gone, I miss them!

There seems to be so much removed/broken in this update from months ago, and lots of goodies deprecated and destined to be removed in future. From the docs:

Tool documentation (Deprecated):
•SmartGUI Creator 4.0
•MsgBox Creator
•GenDocs 3.0
•Scriptlet Utility
•TillaGoto

It's still the best option out there, just hoping the project isn't going down the pan, maybe from dependencies like Scintilla breaking its functions, and it would be good to know what the roadmap looks like.

lexikos
Posts: 9551
Joined: 30 Sep 2013, 04:07
Contact:

Re: SciTE4AutoHotkey v3.1.0

Post by lexikos » 23 Dec 2022, 19:19

@ahketype
fincs wrote:Calltip functionality has been temporarily removed as a side effect of the new syntax definition autogeneration, as well as SciTE limitations.
I think "SciTE limitations" was referring to how SciTE identifies parameters vs. AutoHotkey allowing the parentheses to be omitted. We've come up with a solution for that. I think there was still an issue with calltips being displayed for words that have no parameters defined, but that should be simple to fix.

"syntax definition autogeneration" is apparently referring to a script fincs used to generate the keywords, but he hasn't added it to version control. (Edit: Looks like it's here.) I believe it needs to be improved to extract the parameter definitions from the documentation (which I assume is where it is getting the keywords) and generate a proper API file.

Extracting syntax information from the documentation is something that I think should be made available for general use, and kept with the documentation (on GitHub). I started writing a v2 script for it, but it's not as interesting as my other projects... plus I'm not sure how much fincs' current script does, since he apparently hasn't shared it.
I've always cursed the calltips because there was no way to remove them or make them only pop up manually on a hotkey
The keyboard shortcut is shown in the Edit menu, next to "Show Calltip". Pressing Escape hides the calltip.

If I recall correctly, the calltip functionality can be restored in the current build (with the "SciTE limitations" still present) by defining the appropriate properties and providing API definitions (which you can copy from a previous version). Of course, I'm sure we'd all prefer that @fincs release an update that fixes these things.
Tool documentation (Deprecated):
I personally never used any of these, and I make a point of disabling Tillagoto because its default hotkeys irritate me. My preference would be to start the editor with a clean slate, and then let tools be installed as extensions (which could be done by the installer). I think the extensions function of S4A has been somewhat underutilized. (Actually, my preference would be an editor built with AutoHotkey v2, allowing extensions built in the same, not mixing Lua, SciTE properties and AutoHotkey. But I have too much else to do.)

ahketype
Posts: 191
Joined: 27 Oct 2016, 15:06
Location: Yorkshire, UK

Re: SciTE4AutoHotkey v3.1.0

Post by ahketype » 24 Dec 2022, 09:40

Thanks, @lexikos, great to know it's still being developed!
lexikos wrote:
23 Dec 2022, 19:19
I've always cursed the calltips because there was no way to remove them or make them only pop up manually on a hotkey
The keyboard shortcut is shown in the Edit menu, next to "Show Calltip". Pressing Escape hides the calltip.
Yes, the shortcut shows the calltip when not automatically activated, and Escape closes it. However, it still automatically shows again at its usual points, like entering the opening parenthesis or a comma after a command, AFAIK. What would be really useful for me would be to switch off the automatic showing, because it gets in the way most of the time when I know how the command goes (especially as I might be reusing the same one many times in a section of code), but to show it with the shortcut when I need it. Some instances are relatively unimportant, but intrusive. For example, when I type "if " I get

Code: Select all

if (expression){
   commands
   }else{
   commands
}
Specifies the command(s) to perform if an expression evalutates to TRUE.
Now, that's not too much bother if I just know I'm typing "if !var" - it's gone when I hit Enter - but I might be looking in the following code at that point for variable names or whatever. So I hit Escape, and it closes, only to reopen again when I type a "(".

If I type "if (var= ", possibly having escaped from the calltip twice already, it opens again after the final space (although not apparently with "if (var = ". However, having had to hit Escape twice by then is pretty irritating, and a nested set of ifs is a PITA. The manual shortcut alone would suit me fine, but the feature is so helpful for code I'm less familiar with as to be indispensable, so I've reverted for now.

lexikos
Posts: 9551
Joined: 30 Sep 2013, 04:07
Contact:

Re: SciTE4AutoHotkey v3.1.0

Post by lexikos » 24 Dec 2022, 18:17

Ah yes, I missed the "only" in "only pop up manually".

Adding this to UserLuaScript.lua should stop the calltip from popping up when you type "(":

Code: Select all

RegisterEvents({
    OnChar = function(ch)
        return editor.Focus and ch == "("
    end
})
I have tested it only in the current development version, with a function defined in ahk2.user.api.
it opens again after the final space
I guess that's because there's a space character in the calltip.lexername.parameters.start property. SciTE isn't designed to handle cases where the start character also appears in the parameter list, but some versions of S4A put it there for command/control flow calltips. Probably best to remove it from there; alternatively, you can add or ch == " " to the script above.

Dougal
Posts: 26
Joined: 19 Aug 2014, 16:51

Re: SciTE4AutoHotkey v3.1.0

Post by Dougal » 15 Jan 2023, 22:53

iPhilip wrote:
15 May 2022, 15:11
@fincs, Never mind. I see you have a perfectly good AutoComplete feature in your latest version.
I removed the UserLuaScript.lua and AutoComplete.lua files from my SciTE folder and restarted with no error. :)

P.S.: Lexicos' AutoComplete auto-completes any word, e.g. variables, while the built-in AutoComplete only auto-completes commands.
I have searched and couldn't find how to enable variable autocomplete with finc's built-in auto complete, so fiddled to get @lexikos AutoComplete v0.8 working.

Used steps from @lexikos Autocomplete.lua script, which gave me the same error as @iPhillip on launch: AutoComplete.lua:80: invalid escape sequence near '"[\('.
From https://www.educative.io/answers/what-are-escape-characters-in-lua single backslash in LUA strings is an escape character, need two to output a backslash in a string. Edited AutoComplete.lua line 80 to escape the escape char \ it was complaining about eg to name = name:gsub("[\\(, ].*", "") -- Discard parameters/comments..
Next launch had error Documents\AutoHotkey\SciTE\ahk1.user.api' (No such file or directory) in line 79.
Created empty file of same name in settings folder, and now @lexikos AutoComplete.lua loads and appears to work. Variables (and all words in last save) now auto complete in SciTE4AHK v3.1.0.

Hope this helps someone.
Cheers

Post Reply

Return to “SciTE4AutoHotkey”