Closed mdnava closed 3 months ago
DONOT REPORT ISSUES REGARDING FEATURES
DONOT REPORT ISSUES REGARDING IMPORTING GUIS
This is a port of an existing application. It has limitations and I will not be expanding on the base features. Importing scripts does not work.
Ok, I understand the previous statements, but I'm a bit confused, since I think it somewhat contradicts the "Contribution" section in the README.
May I just say that I use the .ahk2 file extension for AHK2 and the .ahk extension for AHK1, and it all works perfectly but doesn't seem to be supported by AutoGUI for AHK2. No saving, and no syntax highlighting for .ahk2 files.
I'd appreciate any comment on how to fix this, particularly the stx highlighting part.
I understand if this issue falls into the WARNING category.. just thought I'd give it try.
Best regards!
all of that is fair to ask about, its directly outside the features of the original program, as the original program was designed before ahkv2.
I've never touched the .ahk2 extension, from my understanding there may have been a period of use at .ahkv2
but we then migrated to .ahk
with #Requires ahkv2
if this is wrong, and it might totally be incorrect, I will gladly update to handle both output file formats. I havent seen this used in a while.
all of that is fair to ask about, its directly outside the features of the original program, as the original program was designed before ahkv2.
I've never touched the .ahk2 extension, from my understanding there may have been a period of use at
.ahkv2
but we then migrated to.ahk
with#Requires ahkv2
if this is wrong, and it might totally be incorrect, I will gladly update to handle both output file formats. I havent seen this used in a while.
@samfisherirl Honestly I never knew (or don't remember) the .ahk2 extension was supported at all. I just think
it makes sense because I have so much code in both versions and the #Requires ahkv2
is more of a problem
than a solution, because it does not solve the issue of what version of AHK should be associated with
the .ahk file extension. Different would be the case if #Requires would actually decide which AHK version
distribution to run with, not just on which case to halt completely.
Having both file extensions means I can make scripts with either version and just click on it to run. Even when I'm using it any other way (like in context menus), having the ahk/ahk2 file extensions allows me to know with what AHK I'm working right out of the bat.
In my particular case, I still have much AHKv1 in use that would not allow me to just disregard it. Not only do I use AHK for setting up actual hotkeys, but I've been using it for console-less scripting, since PowerShell cannot just do that, and VBScript has been fading away for a very long time without any updates.
What I would propose is to support the .ahk2 extension in AutoGUI not just for the sake of it.. but to support the language implementation to create GUIs. Since AutoGUI is basically a code editor, perhaps it could try to recognize either just the file extension or some part of the code like the #Requires header. Just an idea.
Best regards!
Best regards!
Im not against the idea, but youre wrong on one thing.
I just think it makes sense because I have so much code in both versions and the #Requires ahkv2 is more of a problem than a solution, because it does not solve the issue of what version of AHK should be associated with the .ahk file extension
so no coding language has extensions by version.
your issue is an easy resolution.
create two extension types. .ahk1
and .ahk2
and associate each with respective compiler.
or both with .ahk
and write a custom file handler that reads the script before running and if instr #Requires v2 run on v2
lastly, I have both installed. I have ahkv2 associated and it automatically passes v1 scripts to v1, so idk how you have the issue.
I just think it makes sense because I have so much code in both versions and the #Requires ahkv2 is more of a problem than a solution, because it does not solve the issue of what version of AHK should be associated with the .ahk file extension
so no coding language has extensions by version. #Requires ahkv2 is a solution to the compilers problem. your issue is an easy resolution.
Yes, that's mostly true.. I was only making a point. However, file extensions can and have been used to overcome versioning issues for scripting and for the web (.php3, .php4, pl6, and .ahk2 as you mentioned).
create two extension types.
.ahk1
and.ahk2
and associate each with respective compiler.
I already do this.. I've made the association of the .ahk file extension with AHKv1 and the .ahk2 file extension with AHKv2.. This is not an issue. Both the runtime and the compiler support the .ahk2 extension.
or both with
.ahk
and write a custom file handler that reads the script before running and if instr #Requires v2 run on v2
Not a bad idea, but I wouldn't want to introduce any unneeded overhead, even if small, or another external point of failure. Scripting is sometimes critical. And although AHK is usually fairly fast for its purpose, it can become quite slow in some cases, particularly when using loops.
lastly, I have both installed. I have ahkv2 associated and it automatically passes v1 scripts to v1, so idk how you have the issue.
The issue is not with running scripts. I have that covered. That's why I showed you the file icons. I've already implemented file associations and they work fine. No issues there.
The only issue is with opening, editing and saving scripts with the .ahk2 file extension in AutoGUI for AHKv2.
As a reference, that's Aventura, the code editor I understand is the source of AutoGUI. It can open, edit and save using .ahk2 file extension. It just recognizes the AHK code.
Since AutoGUI for AHKv2 is at its core a code editor, it would be really helpful if it could do the same.
Best regards!
DONOT REPORT ISSUES REGARDING FEATURES
DONOT REPORT ISSUES REGARDING IMPORTING GUIS
This is a port of an existing application. It has limitations and I will not be expanding on the base features. Importing scripts does not work.
Ok, I understand the previous statements, but I'm a bit confused, since I think it somewhat contradicts the "Contribution" section in the README.
May I just say that I use the .ahk2 file extension for AHK2 and the .ahk extension for AHK1, and it all works perfectly but doesn't seem to be supported by AutoGUI for AHK2. No saving, and no syntax highlighting for .ahk2 files.
I'd appreciate any comment on how to fix this, particularly the stx highlighting part.
I understand if this issue falls into the WARNING category.. just thought I'd give it try.
Best regards!