online converter: converts your autohotkey code into pretty indented source code.

Discuss other useful utilities, general computing tips & tricks, Internet resources, etc.
User avatar
kczx3
Posts: 1640
Joined: 06 Oct 2015, 21:39

Re: online converter: converts your autohotkey code into pretty indented source code.

Post by kczx3 » 23 Sep 2022, 08:14

@thqby is it possible to configure your formatter to do OTB but to insert a new line between branches? I prefer the below rather than having the else if appear on the same line as the closing brace of the if.

Code: Select all

; Only care about edit controls
if (gCtrl.type = "Edit") {
    OutputDebug(gCtrl.Text . "{Tab}")
    Sleep(100)
}
else if (gCtrl.type = "DropDownList") {
    OutputDebug(StrReplace("{Down {}}{Space}{Tab}", "{}", gCtrl.value - 1))
    Sleep(100)
}
It also seems like the OTB setting doesn't really impact the opening brace for a function definition. Setting OTB to false makes the opening brace move to the next line after the function's name and arguments, but then setting OTB to true and re-formatting doesn't move the function's open brace back to the same line as the function name.

User avatar
thqby
Posts: 396
Joined: 16 Apr 2021, 11:18
Contact:

Re: online converter: converts your autohotkey code into pretty indented source code.

Post by thqby » 24 Sep 2022, 12:16

kczx3 wrote:
23 Sep 2022, 08:14
It also seems like the OTB setting doesn't really impact the opening brace for a function definition.
This is a mistake.

In the next version, the above style is used when one_true_brace is set to -1

Post Reply

Return to “Other Utilities & Resources”