Jump to content

WinSetTitle - permanently?


Recommended Posts

The title of some apps is dynamic. For example, Sublime Text. Open some file, make some changes and you will see that the title of Sublime Text is now supplemented with a bullet (•). Press Ctrl+S and the bullet will disappear.

In such a case, the changes made by WinSetTitle will be lost. Is it a bug? How would you workaround it?

Example()

Func Example()
    Run("C:\Program Files\Sublime Text 3\sublime_text.exe")
    Local $hWnd = WinWait("[CLASS:PX_WINDOW_CLASS]", "", 10)
    WinSetTitle($hWnd, "", "test")
EndFunc

 

Edited by john_2019
Link to comment
Share on other sites

Like you did show us, by using its CLASS name.  Once found, by using its handle for the rest of the script.  But there is also those 2 options :

Quote
  • REGEXPTITLE - Window title using a regular expression (if the regular expression is wrong @error will be set to 2)
  • REGEXPCLASS - Window classname using a regular expression (if the regular expression is wrong @error will be set to 2)

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...