Closed derz00 closed 6 years ago
What sort of file, and what command?
Also if you could include the file that would be great.
I have been using .ahk2
to allow for running both versions of AutoHotkey. Attached is a test file.
test.txt
You're evidently online 👍
And you didn't create a ahk2.xml file? Just so we are on the same page
No, I wouldn't be that smart :)
aww, don't say that. I'll make a bit of a tutorial on how to make one....eventually.
Anyway, I'll look into it.
oh wow...yea, that's not good. I will see what I can do.
Thank you. Do I open a Github issue for every problem like this I have with Studio? Or where can I ask you simple questions?
I put in a quick fix. Force an update if it doesn't say there is one....which it probably won't. I'll push an official update when I get a few more things fixed up.
Uh, yes, there was an update, but it didn't change the version number (1.005.00). There wasn't an update there when I told it to check a couple days ago. And, yes, now the indent seems to work (doing further testing)
No, it doesn't quite work. It doesn't indent at all now, for example after if
loop
etc
.ahk files still work
I don't always change the version numbers. If it does not show "No new updates" (or whatever I put in there I honestly can't remember) then the code has been updated.
Right, if there isn't a control file for the file type, like .txt or .ahk2, it will not know that anything needs indented. I am changing Studio to work with multiple languages. Do you call the files .ahk2 ? Edit: duh, you said you did. OK, I'll tell you what to do
Close Studio
<FileTypes lexer="ahk" language="ahk" name="AutoHotkey">ahk</FileTypes>
to
<FileTypes lexer="ahk" language="ahk2" name="AutoHotkey2">ahk2</FileTypes>
You can add whatever file types you want to work like ahk2 by adding them space delimited in
<FileTypes lexer="ahk" language="ahk" name="AutoHotkey2">ahk2 txt whatever</FileTypes>
OR!
Edit the line in ahk.xml
<FileTypes lexer="ahk" language="ahk" name="AutoHotkey">ahk ahk2</FileTypes>
Would the last line be more like this, with ahk2? (to clarify what you say) Sorry, but I feel insecure with this yet, and didn't want to get confused. <FileTypes lexer="ahk" language="ahk" name="AutoHotkey2">ahk2 txt whatever</FileTypes>
uh, I see the latest edit now 😛
I think I will make a ahk2.xml
to tweak syntax, etc
<FileTypes lexer="ahk" language="ahk" name="AutoHotkey2">ahk2 txt</FileTypes>
That should work if you want .txt to work the same as .ahk2 files. I think that is a great idea :)
Did you make ahk.xml
all by hand or could you automate it with data from the documentation?
a little bit of both to be honest. I had to write something to build the syntax and the was also something I have been working on for a few years to get "right"
I am having problems with editing the theme. Does it work for you in beta? Changes are inneffective...
which things in theme are you trying to change?
matching braces, and variables colour. I click on it, change it, but the examples in the theme do not change, and clicking them again, the settings are back to the original.
is this for .ahk files or .ahk2?
I didn't know there is a difference? It behaves the same when either of the two is the selected script
Where's the next best place to talk to you besides Discord or opening GitHub issues? ;)
Up to you, I'm on Discord right now but you let me know where would be the best place to chat about this.
AHK Studio Beta automatically indents the next line after entering a command, etc (after which you wouldn't normally indent) when the file extension is different than
.ahk
(But it is in my personal extensions list)