nokia6300 Posted March 29, 2009 Share Posted March 29, 2009 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 More sharing options...
Valuater Posted March 29, 2009 Share Posted March 29, 2009 They should work the same The only difference I would have expected is the use of $a in your second scriptlet This uses $a and $b $a = "Mozilla Firefox" $b = "Internet Explorer" If WinExists ($a) Then WinSetTitle($a, "", $B) Endif 8) Link to comment Share on other sites More sharing options...
Authenticity Posted March 29, 2009 Share Posted March 29, 2009 The former is not as specific as the later but in the same context both are relating to the same window. Both will retitle the "Somthing Forums - Mozilla Firefox" title to "Internet Explorer" Link to comment Share on other sites More sharing options...
TerarinK Posted March 29, 2009 Share Posted March 29, 2009 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 More sharing options...
Valuater Posted March 29, 2009 Share Posted March 29, 2009 Remember that these two programs, the ones you are relating to, will change the title immediately when the URL changes. You also might want to look at Win Set Title Options in help 8) Link to comment Share on other sites More sharing options...
MHz Posted March 29, 2009 Share Posted March 29, 2009 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now