I apologize for my English if my words were misunderstood or mistranslated because my native language is Russian, but I hope the main idea of my idea was clearly stated.

Originally Posted by maroon
I don't know of the development environment you speak of
Now I mainly work in the "PyCharm" development environment for programming in the Python language.

Originally Posted by maroon
This idea would need to be fleshed out, and surely made optional, because if 'identifier warning' is unchecked by default, I would assume this would also.
I believe that this innovation in the scripts editor should be enabled by default, because it will be immediately available to beginners, while they have not yet figured out how to use the mIRC settings, but experienced users will immediately figure out how to disable this option if they consider that this option is they don't need it.

Originally Posted by maroon
If someone does want to have the parenthesis inserted automagically, I assume the desired behavior would be to move the cursor inside the parenthesis
Yes, I forgot to mention this, it is absolutely correct and logical that after writing the if command, the cursor focus should be moved inside the newly created empty parentheses: if (|) { }

Originally Posted by maroon
Also the desired 'coaching' behavior would probably be to include several spaces inside the auto-added curly braces so that the novice isn't coached into expecting that it's fine for the interior command to touch the curly braces.
Yes, it would probably be the right thing to add some (2) spaces inside the curly braces to make editing easier and avoid errors: if () { | }

Originally Posted by maroon
/while has the same variety of syntax that if() has, and even more-so since it's much more common for the while { condition } to be split across lines.
Yes, it would also be useful for beginners, so that after writing the while command, the correct loop code structure is automatically created, for later adding your own parameters to it.

For example, the following automatic construction could be created:
Code
var %i 1
while (%i <= 1) {
  
  inc %i
}


Originally Posted by maroon
If you're proposing this for if(), I wonder what other things in that other environment are you thinking would be relevant here, besides doing the same thing for while()
If this idea turns out to be in demand and will be implemented in the beta version, then I will definitely think about what else I can offer useful for editing mIRC scripts. In fact, there can be many more interesting ideas.

Originally Posted by maroon
The idea behind your proposal does have merit. As I've mentioned several times in forum posts, I agree the new scriptors should get in the habit of 'when in doubt use parenthesis', partly because it's easier for them to read their code later.
Thank for your support and due attention to my idea, as well as for additional tips and important comments.


🌐 https://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples