Meanwhile, thank you very much for your support, it would have been useful to have a function to call within the script to be able to reuse it in several parts of the program, but if there is no way I will use your method, in the end I just want the script to be reliable.