Hello this is the code maybe you can figure it out I placed some comments to try and explain what I want
#include <Array.au3>
AnyDeskOpen()
Func AnyDeskOpen()
Global $aWinList = WinList("[REGEXPTITLE:(?i)(.*Anydesks*)]") ;get window name and handle from windows and store into an array...