I developed a vscode plugin that supports debugging ahk script and hope to be helpful to ahk amateur.
It's support debug(breakpoint,step run, variable view)、symbol detacher in vscode
more detail:https://github.com/cweijan/vscode-autohotkey
Autohotkey editor for vscode
Autohotkey editor for vscode
- Attachments
-
- 22.gif (295.57 KiB) Viewed 8308 times
Re: Autohotkey editor for vscode
Well done!
Looks awesome!
I'm using it right now and it's perfect!
I've been missing it for a long time!
I have two questions although not about debugging:
1. How do you create such a marvelous gif-file?
2. If you work with vscode you may know how to use suggestions.
When I start typing "outp" a suggestion appears with command "OutputDebug".
I choose it by pressing tab.
And here is what I see:
I get a silly command:
When I proceed typing, for instance, text literal "hello" and here is what I get:
After that I need to remove sight %
Not to mention multiple items of the same sugggestion in the list..
Doesn't everybody suffer from this bullshit?
Such a suggestion doesn't help me at all and even forces me to put more effort and time to correct it each time I use it.
Anybode knows how it is supposed to be used?
Or how to disable this annoying behaviour?
Looks awesome!
I'm using it right now and it's perfect!
I've been missing it for a long time!
I have two questions although not about debugging:
1. How do you create such a marvelous gif-file?
2. If you work with vscode you may know how to use suggestions.
When I start typing "outp" a suggestion appears with command "OutputDebug".
I choose it by pressing tab.
And here is what I see:
I get a silly command:
When I proceed typing, for instance, text literal "hello" and here is what I get:
After that I need to remove sight %
Not to mention multiple items of the same sugggestion in the list..
Doesn't everybody suffer from this bullshit?
Such a suggestion doesn't help me at all and even forces me to put more effort and time to correct it each time I use it.
Anybode knows how it is supposed to be used?
Or how to disable this annoying behaviour?
Focusing our efforts on non-productive and non-creative endeavours wastes lives as surely as war.
Jacque Fresco / The best that money can't buy
Jacque Fresco / The best that money can't buy
Re: Autohotkey editor for vscode
You find the snippets here:
C:\Users\<user>\.vscode\extensions\cweijan.vscode-autohotkey-plus-2.2.0\snippets\ahk.json
and then you can certainly adapt them to your needs.
C:\Users\<user>\.vscode\extensions\cweijan.vscode-autohotkey-plus-2.2.0\snippets\ahk.json
and then you can certainly adapt them to your needs.
Re: Autohotkey editor for vscode
Thank you so much.
It looks like what I exactly need.
Won't my changes be overwritten during the next release of the extension?
It looks like what I exactly need.
Won't my changes be overwritten during the next release of the extension?
Focusing our efforts on non-productive and non-creative endeavours wastes lives as surely as war.
Jacque Fresco / The best that money can't buy
Jacque Fresco / The best that money can't buy
Re: Autohotkey editor for vscode
https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets
You can copy and adjust snippets from the extension to your own snippet file. Or create your own snippets.
"select User Snippets under File > Preferences "
You can copy and adjust snippets from the extension to your own snippet file. Or create your own snippets.
"select User Snippets under File > Preferences "
Last edited by haichen on 29 Mar 2020, 07:33, edited 1 time in total.
Re: Autohotkey editor for vscode
This could be an example for your own snippetfile:
C:\Users\<user>\AppData\Roaming\Code\User\snippets\ahk.json
C:\Users\<user>\AppData\Roaming\Code\User\snippets\ahk.json
Code: Select all
{
"OutputDebug": {
"prefix": "OutputDebug",
"body": "OutputDebug, ${1:Text}${2: % }$3",
"description": "haswells version: Sends a string to the debugger (if any) for display."
}
}
Re: Autohotkey editor for vscode
Hello
Ive been using this plugin but not the debugging/running. At first a little while ago it wouldnt load my file cause my directory had a space.
Now I have tried and Im finding that my script isnt actually running. I have no breakpoints or anything set, and it seems like it stalls at different parts, like every time I hit run and then press my hotkeys i get a different behaviour.
I've spent some pretty good time analyzing the textmates because Im making a theme and have been working in AHK a lot recently (im not very good). Ive noticed that there is a "source.ahk functionline.ahk string.function.arguments.ahk", textmate, but I can only get it to appear SOMETIMES. I havent quite figured out the logic behind it, but sometimes its a matter of having the opening { on the same line as the function, but other times it doesnt seem to make a difference. One thing I dont like about it when it does work is that it converts all the text in the function line, punctuation, byref (keyword.other) into the same color.
Also wondering what you have planned for formatting? sometimes I seem to get some strange results. From what I have learned it seems that preparing a function like
Because it seems to give the best results, but then I have two functions I am looking at right now which have the { on the opening line but they look like
Anyway, keep up the good work, I noticed youve been working really hard lately.
Maybe if you dont mind, and if I can figure out how to create an extension, I could try and see if I can do anything to tighten up the text mates, refine the scopes and bring some of them more in line with other genreal languages? I dont expect to do any better but Im willing to try.
Ive been using this plugin but not the debugging/running. At first a little while ago it wouldnt load my file cause my directory had a space.
Now I have tried and Im finding that my script isnt actually running. I have no breakpoints or anything set, and it seems like it stalls at different parts, like every time I hit run and then press my hotkeys i get a different behaviour.
I've spent some pretty good time analyzing the textmates because Im making a theme and have been working in AHK a lot recently (im not very good). Ive noticed that there is a "source.ahk functionline.ahk string.function.arguments.ahk", textmate, but I can only get it to appear SOMETIMES. I havent quite figured out the logic behind it, but sometimes its a matter of having the opening { on the same line as the function, but other times it doesnt seem to make a difference. One thing I dont like about it when it does work is that it converts all the text in the function line, punctuation, byref (keyword.other) into the same color.
Also wondering what you have planned for formatting? sometimes I seem to get some strange results. From what I have learned it seems that preparing a function like
Code: Select all
thisIsMyFunction(arg1, arg2..)
{
code
}
Rather Than
thisIsMyFunction(arg1, arg2..) {
code
}
Code: Select all
chunkExpander(virginChunkChars, numCharsToExpandTo, disableDev := true) {
while (strlen(virginChunkChars) < numCharsToExpandTo) ;no indent
virginChunkChars .= virginChunkChars ;no indent
virginChunkChars := substr(virginChunkChars, 1, numCharsToExpandTo) ;no indent
return virginChunkChars
} ;------------------------------------------------------------------------------------------>
sumOfChunks(lineOfChunks) {
sum := 0
loop, % lineOfChunks.maxindex()
if !(instr(lineOfChunks[A_Index, 2], "rF") || instr(lineOfChunks[A_Index, 2], "rH"))
sum += lineOfChunks[A_Index, 3] ;no indent
return sum
}
Anyway, keep up the good work, I noticed youve been working really hard lately.
Maybe if you dont mind, and if I can figure out how to create an extension, I could try and see if I can do anything to tighten up the text mates, refine the scopes and bring some of them more in line with other genreal languages? I dont expect to do any better but Im willing to try.
Return to “Visual Studio Code”
Who is online
Users browsing this forum: No registered users and 11 guests