Toine Posted February 8, 2007 Share Posted February 8, 2007 Hi, I'm searching a way of changing the title of the main form of my new application. Thanks to say me if it is possible, and how can I manage this. Link to comment Share on other sites More sharing options...
/dev/null Posted February 8, 2007 Share Posted February 8, 2007 form? application? change title? Can you please be more specific? __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Toine Posted February 8, 2007 Author Share Posted February 8, 2007 I'm sorry if I'm not really explicit ; Create the GUI window and controls GuiCreate("MyGUI", 191, 157,(@DesktopWidth-191)/2, (@DesktopHeight-157)/2) $Label_1 = GuiCtrlCreateLabel("Label1", 30, 40, 131, 21, 0x1000) $Input1 = GUICtrlCreateInput("", 10,10) $button1 = GuiCtrlCreateButton("Set Label", 30, 90, 130, 20) ; Run the GUI until it is closed GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop ;When button is pressed, label text is changed ;to combobox value Case $msg = $button1 $data = GUICtrlRead($Input1) GuiCtrlSetData($Label_1, $data) EndSelect WEnd Exit I want to do the same thing but instead of changing the text of a label, I want to change the title of the GUI ("MyGUI" would be replaced by the text typed in the inputbox) Link to comment Share on other sites More sharing options...
Helge Posted February 8, 2007 Share Posted February 8, 2007 $gui = GUICreate(..) ;.. WinSetTitle($gui, "", $data) Link to comment Share on other sites More sharing options...
Toine Posted February 8, 2007 Author Share Posted February 8, 2007 Thanks a lot, that's what I was looking for Link to comment Share on other sites More sharing options...
rehnmark Posted February 12, 2007 Share Posted February 12, 2007 Just what i was looking for ... .thanx Link to comment Share on other sites More sharing options...
zorphnog Posted March 20, 2008 Share Posted March 20, 2008 Hmm...Would be nice if they actually mentioned in the documentation that you can send a window handle instead of the window title. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 20, 2008 Moderators Share Posted March 20, 2008 Hmm...Would be nice if they actually mentioned in the documentation that you can send a window handle instead of the window title.title The title of the window to change. See Title special definition.From link of "See Title special definitionsWindow Handles / HWNDs The variant datatype in AutoIt natively supports window handles (HWNDs). A window handle is a special value that windows assigns to a window each time it is created. When you have a handle you may use it in place of the title parameter in any of the function calls that use the title/text convention. The advantage of using window handles is that if you have multiple copies of an application open - which have the same title/text - you can uniquely identify them when using handles. When you use a window handle for the title parameter then the text parameter is completely ignored.Various functions such as WinGetHandle, WinList and GUICreate return these handles. It is important to note that a window handle is not classed as a number or string - it is its own special type. Note: Window handles will work no matter what WinTitleMatchMode is currently in use. 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...
zorphnog Posted March 20, 2008 Share Posted March 20, 2008 Touche. I stand corrected. Never saw that last section of the special definitions. 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