Jump to content

Which way is best to set windows title


Recommended Posts

For example if I want to change the name of any window by using autoit command "WinSetTitle" then is it compulsory to get the windows name 1st by using "WinGetTitle" will it have the same effect if I direct re-labale any windows title for example if I write a codes as given below

$a = "Mozilla Firefox"

If WinExists ("Mozilla Firefox") Then
     WinSetTitle($a, "" , "Internet Explorer")
endif

the 2nd way is

$a = "Mozilla Firefox"
$b = WinGetTitle($a)

If WinExists ("Mozilla Firefox") Then
     WinSetTitle($b, "", "Internet Explorer")
Endif

what will be the difference in both above given examples?Are they work same??If not then elaborate the difference if U people can

Link to comment
Share on other sites

This is a good ground to get onto however WinGetHandle would be the surest way of suceeding when the title changes

$hHandle = WinGetHandle("Mozilla Firefox")
If WinExists("$hHandle") Then
     WinSetTitle($hHandle, "" , "Internet Explorer")
EndIf

You mostly see that change when you opening and closing windows but yet the application stays, MDI documents at there best

0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E

Link to comment
Share on other sites

Using Firefox to view/use

$a = "Mozilla Firefox"

$a = "Which way is best to set windows title - AutoIt Forums - Mozilla Firefox"
$b = WinGetTitle($a)

If WinExists ("Which way is best to set windows title - AutoIt Forums - Mozilla Firefox") Then
     WinSetTitle($b, "", "Which way is best to set windows title - AutoIt Forums - nokia6300")
Endif

; Notice the nokia6300 is the change to the title of your Firefox browser....
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...