better-comments icon indicating copy to clipboard operation
better-comments copied to clipboard

Add AutoHotKey language support

Open leox23 opened this issue 2 years ago • 2 comments

Hi @aaron-bond, AutoHotKey is a free and open-source custom scripting language for Microsoft Windows.

Official AutoHotKey website: https://www.autohotkey.com/

AutoHotKey docs: https://www.autohotkey.com/docs/v2/Language.htm#comments (v1 and v2 are the same)

AutoHotKey Comments

Inline comments

Scripts can be commented by using a semicolon at the beginning of a line. For example:

; This entire line is a comment.

Comments may also be added at the end of a line, in which case the semicolon must have at least one space or tab to its left. For example:

Run Notepad  ; This is a comment on the same line as a command.

Block comments

In addition, the /* and */ symbols can be used to comment out an entire section, as in this example:

/*
MsgBox "This line is commented out (disabled)."
MsgBox "Common mistake:" */ " this does not end the comment."
MsgBox "This line is commented out."
*/

MsgBox "This line is not commented out."
/* This is also valid, but no other code can share the line. */

Excluding tabs and spaces, /* must appear at the start of the line, while */ can appear only at the start or end of a line. It is also valid to omit */, in which case the remainder of the file is commented out.

leox23 avatar Jan 28 '23 18:01 leox23

Commenting so I don't lose this one, as the maintainer of AHK++ I too would like this! I'll see if I can open a PR once I'm freer, probably late September, early October

mark-wiemer avatar Aug 31 '24 02:08 mark-wiemer

I believe this has been present for a while :) things are working with AHK++ 6.2.2!

image

#Requires AutoHotkey v2
#SingleInstance Force
#MaxThreadsPerHotkey 3

global ClickerToggle := false
ClicksPerSecond := 10
;* Start the autoclicker on Ctrl+Z
^z::
{
	; todo prompt the user to confirm
	global ClickerToggle := !ClickerToggle
	Loop
	{
		If (!ClickerToggle)
			Break
		Click
		Sleep 1000 / ClicksPerSecond
	}
}

mark-wiemer avatar Oct 08 '24 12:10 mark-wiemer