I appreciate every last thing the AHK devs have done, and the addition of the switch statement is fantastic, but I would like to be able to stack switch cases like you can in other languages, rather than have them comma delimited. In brief, I wouldn't mind seeing the following equivalent if it was easy, but I see why that could be a problem as it just looks for the 'case' keyword followed by something and ending in a ':'
Code: Select all
Case "AcceptAllFormatChanges","AcceptAllandStopT","InsertNotesInText":
Code: Select all
Case "AcceptAllFormatChanges":
Case "AcceptAllandStopT":
Case "InsertNotesInText":
the reasoning being, you can access the switched variable in multiple 'cases' in fewer lines, or at least without having a really long single lines here and there, in this situation, I was doing this beneath where I was looking to stack various cases
Code: Select all
Switch params[1]
;...
ComObjActive("Word.Application").Run("!" . params[1])
and I have also used the switch case in message monitors, which with a streamdeck or similar are very powerful, but you have to have so many cases and a lot of times, as you add them it is nice to be able to use line position editing to move them around. Just by way of example and not every editor has this feature, but you can move entire lines up and down in notepad++ which is quite handy for Case statements, especially as you may realize along the way they need to be in a different place or sort order for clarity and consistency.
Humbly requested!