I have a similar problem described below. I cannot rely on the title to select a window but need a unique identifier. How can I get the current window handle so that I can use it switch back later ?
The solution of the above problem says I can use New UiPath.Core.Window(CType(in_Handle, IntPtr)). But how can I get in_Handle value ?
In_handle is a value that I pass as an argument to the UiPath workflow. I use Autohotkey to find the target window title text and get the int32 handle value. I then call the workflow from AHK script. You can also use UiPath Get Attribue to get the handle value.