Are there any tools to consistenly reformat existing AHK code?
I mean, something like ClangFormat. The only such tool for AHK I hear about is Toralf's "Auto-Syntax-Tidy".
However, the links to it's reworked version (by Sergejzr) are not available (I'm not surprised, it was 2015). See the last two posts here:
https://autohotkey.com/board/topic/7169 ... v12/page-6
So, does anybody have the most recent version of this script or probably someone knows another tool for this task?
(Please, note: I'm not asking about something like "quick suggestons" in some editors. I need to reformat existing code, instead of writing new).
Tools to reformat existing code
Re: Tools to reformat existing code
My converter has some abilities to tidy code, I plan to release a much easier to use version, but it could be some weeks/months. [I.e. it can simply tidy up an AHK v1 script.]
AHK v1 to AHK v2 converter - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 37&t=36754
And I have this for DllCall lines:
DllCall converter/cleaner (e.g. x32 to x64/x32 two-way compatible) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=31365
AHK v1 to AHK v2 converter - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 37&t=36754
And I have this for DllCall lines:
DllCall converter/cleaner (e.g. x32 to x64/x32 two-way compatible) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=31365
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: Tools to reformat existing code
@jeeswg Very interesting, thanks. I also found your post in this thread:
https://autohotkey.com/boards/viewtopic.php?t=1778
As I understand, Toralf's formatter requires some "syntax files" and you found them and fixed them according to modern versions of AHK?
However, when I tried to use them together with Toralf's script it doesn't work.
Is it correct that there is no easy way to make Toralf's script to work?
https://autohotkey.com/boards/viewtopic.php?t=1778
As I understand, Toralf's formatter requires some "syntax files" and you found them and fixed them according to modern versions of AHK?
However, when I tried to use them together with Toralf's script it doesn't work.
Is it correct that there is no easy way to make Toralf's script to work?
Re: Tools to reformat existing code
I haven't tested toralf's script. I had hoped that providing the updated versions of the syntax files might help anyone interested to update the script themselves.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Who is online
Users browsing this forum: OrangeCat and 286 guests