@Jinjiro
Goto is almost taboo for beginners learning programming.
In fact, many might not even teach it, and if they do, there's always a warning against its usage.
While there are appropriate uses for goto, they're not relevant for beginners.
AutoHotkey is a language first and foremost, even before being a programming language. There's a reason why it's not recommended, and even cautioned against using it. Even if you're not a programmer, it's a genuinely bad habit. (I'm not a programmer myself either.) If you can't write the same structure of code without using goto, never use it.
And if you can write that code without using goto, you'll understand how much goto harms readability, yourself.
Using
labels itself is problematic. It's better to use
functions.
Starting from v2, functions can only reference labels within their own scope. (And all
hotkeys are functions.)
What you want isn't achievable nor necessary from the outset in v2.
Failing to manage long scripts properly is an issue in itself.
Instead, divide them into shorter scripts using
functions or (slightly more advanced)
classes.
When similar commands repeat, you can shorten the code length by encapsulating the commands' parameters into
for-loops with
arrays.
Looping over specific segments isn't limited to just
loop;
you can also use
settimer to periodically execute a specific thread.
If you don't want to study or want to settle for the status quo, that's your choice and it's respected.
But you should also respect the choices of countless respondents who don't want to write excessively inefficient, unreadable, non-standard, and hard-to-maintain spaghetti code. (To be honest, almost everyone here will think the same.)
I strongly recommend boldly discarding outdated, incorrect customs you're accustomed to and stepping into a new world.
How about posting a functional v1 code here and asking how you can refactor it?
Thank you.