How can I change Window Title Bar Text?

Is it possible to modify the Window Title Bar text?

I am working with multiple read-only windows that show identical Title Bar text for every window instance. I would like to use a Window (or other?) activity to visually identify them by changing each window’s title (based on some other criteria).

Anyone have a suggestion on how this can be done? (note: the included image is for illustration purposes. The actual window title I want to change is for a different Windows app.)
window-Titlebar Text

Hello @grosner ,

Whilst there are other ways to do this, I could suggest a simple way:

Create an empty text file with a new name using the Create file activity.

Open that file directly by specifying it’s full path. If I recall right, the Start Process activity may be able to help you do this in one or both ways:

Open notepad.exe using Start Process, pass the full path of the file as a parameter to the notepad.exe process
Pass the full path of the text file directly to Start Process and in theory the file must open in the default text editor that is notepad.exe

Each file will then open with a distinct window title in Notepad

You can opt to delete the files once you close each notepad window and the file has served its purpose.

I hope this helps.

Thanks for your detailed answer.

In my case I am working with windows (not files) that are instantiated from a third party application. There is no file for me to open in notepad.

So the need is to modify the window text based on the window handle or some other window content.

Still seeking a solution.

You’d have to use some other property of the window to identify it with a selector.

Well if the windows are read-only then modifying their title attributes may be beyond the scope of normal UiPath capabilities. Usually each window of the same title comes with a window handle (hwnd) variable that is unique. But using that with lower level window functions may be too complex a fix.

Even if your window titles are identical, and you set up a loop with an Attach Window activity, it would latch on to the first instance of an identically named window. Closing that window would mean that each subsequent window would be detected on every iteration of the loop.

This process could be repeated until the Attach Window selector fails (in a try-catch loop) to mark the end of working through all the windows.

Alternately, an Advanced Selector with Regex may be used to look for the first instance of several untitled identical windows.

Both these approaches would not require you to modify the title of the window unless that is an absolute requirement of your automation process.