I understand your point, and thank you for your time and advice. There was probably a misunderstanding: my intentions were good, just like yours.
After checking more carefully, I found that the issue was not related to AutoIt nor to the behavior of my script, but simply to an incorrect tab selection that prevented the code from working properly.
From my point of view, if possible, this thread can be removed as well, since itโs not really useful to anyone. I apologize again for opening the topic too hastily without double-checking the code first.
Thanks again, and have a nice day!