BALA Posted January 31, 2007 Share Posted January 31, 2007 I've tried searching for this but I suppose I was to vague in describing it because I kept on getting threads about WinSetTitle and GUICtrlSetData. What I need to know is how to reset the title of a GUI that I've already created. [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 31, 2007 Moderators Share Posted January 31, 2007 I've tried searching for this but I suppose I was to vague in describing it because I kept on getting threads about WinSetTitle and GUICtrlSetData. What I need to know is how to reset the title of a GUI that I've already created.WinSetTitle() Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
BALA Posted January 31, 2007 Author Share Posted January 31, 2007 (edited) WinSetTitle()Oh, I can't believe it was the command I've been avoiding. Well thanks then Edited January 31, 2007 by BALA [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
Shevilie Posted January 31, 2007 Share Posted January 31, 2007 Your own GUI can be dealt with as a normal window.... So every command you can use on a normal window is also possible on a GUI you created Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 31, 2007 Moderators Share Posted January 31, 2007 Oh, I can't believe it was the command I've been avoiding. Well thanks thenDon't know why you've been avoiding it, but if you have to customize it so you feel like you are using it app specific, I suppose you could $MainGUI = GUICreate('Some Random Title', 200, 80) $Input = GUICtrlCreateInput('', 10, 10, 180, 20) $Button = GUICtrlCreateButton('Change', 10, 40, 180, 25) GUISetState() While 1 Switch GUIGetMsg() Case -3 Exit Case $Button _GUISetTitle(GUICtrlRead($Input)) EndSwitch WEnd Func _GUISetTitle($sTitle, $hWnd = '') $hWnd = _GetHWnd($hWnd) Return WinSetTitle($hWnd, '', $sTitle) EndFunc Func _GetHWnd($hWnd) If $hWnd = '' Then $hWnd = WinGetHandle('') ElseIf IsString($hWnd) And WinExists($hWnd) Then $hWnd = WinGetHandle($hWnd) ElseIf StringInStr($hWnd, '0x') And IsHWnd($hWnd) = 0 Then $hWnd = HWnd($hWnd) EndIf Return $hWnd EndFunc Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Helge Posted January 31, 2007 Share Posted January 31, 2007 SmOke_N : Why all the extra-stuff ? $gui = GUICreate("") GUISetState() Sleep(2000) WinSetTitle($gui, "", "newTitle") Sleep(2000) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 31, 2007 Moderators Share Posted January 31, 2007 (edited) SmOke_N : Why all the extra-stuff ? $gui = GUICreate("") GUISetState() Sleep(2000) WinSetTitle($gui, "", "newTitle") Sleep(2000)Did you read my comment? If he felt the need to make it more GUI specific . Edit: On the plus side of that... if you need to pass a child handle that isn't active, you can do that as well. But yes, the need for the UDFs are primarily useless IMO, it was in jest that I did them (thus the laughing face in my comment). Edited January 31, 2007 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
BALA Posted January 31, 2007 Author Share Posted January 31, 2007 (edited) It wasn't exactly avoiding, it's just it caused an error when I tried using it the first time so I thought I was using the wrong command. Anyways I found the real problem (a typo in the variable name ) that was causing the error so it's fine now. Anyways, thanks for the helpful responds. Edited January 31, 2007 by BALA [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
Helge Posted January 31, 2007 Share Posted January 31, 2007 Did you read my comment? If he felt the need to make it more GUI specific .Sure. I read it alright... I think it's a matter of not understand it instead. I even tilted my head at one point Nevermind... You're not the only one who's been lacking a good night sleep lately Link to comment Share on other sites More sharing options...
Shevilie Posted February 1, 2007 Share Posted February 1, 2007 Sleep(100) Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 1, 2007 Moderators Share Posted February 1, 2007 Sleep(100)Um... what does that have to do with changing the title of a window ? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Shevilie Posted February 1, 2007 Share Posted February 1, 2007 You're not the only one who's been lacking a good night sleep lately Gave him a helping hand Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 1, 2007 Moderators Share Posted February 1, 2007 Gave him a helping handI get it Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Shevilie Posted February 1, 2007 Share Posted February 1, 2007 Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
dougie Posted February 1, 2007 Share Posted February 1, 2007 It wasn't exactly avoiding, it's just it caused an error when I tried using it the first time so I thought I was using the wrong command. Anyways I found the real problem (a typo in the variable name ) that was causing the error so it's fine now. Anyways, thanks for the helpful responds. Bala, You can also use a DllCall DllCall("user32.dll", "int", "SetWindowText", "hwnd", $hInst, "str", "Changed the Window Title") Regards Dougie 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