Page 2 of 2

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

Posted: 23 Sep 2022, 08:14
by kczx3
@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.

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

Posted: 24 Sep 2022, 12:16
by thqby
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