bouncingmolar Posted October 24, 2008 Share Posted October 24, 2008 (edited) I want to make a GUI which grabs and displays the text from a window title bar which keeps changing. If I get a msgbox or a GUI window to print the text of title bar, is there a way to make sure it keeps updating Edited October 26, 2008 by bouncingmolar Link to comment Share on other sites More sharing options...
martin Posted October 24, 2008 Share Posted October 24, 2008 I have a single control which keeps changing depending on what the user clicks on.If I get a msgbox or a GUI window to print the text of this control, is there a way to make sure it keeps updating the text as the user clicks on different options.Thanks... sorry if that didn't make sense I had a hard time trying to word it.Do you mean you want to display some information related to what the user clicked on last?.Are the things the user clicks on in a gui you have made or in some other application which you didn't write? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
YellowLab Posted October 24, 2008 Share Posted October 24, 2008 You could use an edit area that is constantly being updated. Check out GUICtrlCreateEdit and GUICtrlSetData. Good Luck. Bob You can't see a rainbow without first experiencing the rain. Link to comment Share on other sites More sharing options...
bouncingmolar Posted October 24, 2008 Author Share Posted October 24, 2008 Do you mean you want to display some information related to what the user clicked on last?.Are the things the user clicks on in a gui you have made or in some other application which you didn't write?The application is one I didn't write. Yes I want to display some information related to what the user has clicked previously (not necessarly last) I updated my original post before I knew anyone had replied yet sorry. I'm just reading the help file yellowlab thanks for the tip Link to comment Share on other sites More sharing options...
bouncingmolar Posted October 24, 2008 Author Share Posted October 24, 2008 You could use an edit area that is constantly being updated.Check out GUICtrlCreateEdit and GUICtrlSetData.Good Luck.BobThanks bob. Thats ok for creating an edit area in a GUI and setting the text in the textboxI want to have a GUI with a 'string' on it.... ie a lable saying: currently clicked on databaseitem1. when a user clicks on another database item, I want the lable to update to Databaseitem2 Link to comment Share on other sites More sharing options...
YellowLab Posted October 24, 2008 Share Posted October 24, 2008 You would still use GUICtrlSetData. The data you pass would be generated from the control that was updated. I am not exactly sure how to grab that info, but I am sure it can be done - maybe ControlGetText or ControlGetFocus or combination. Good Luck. Bob You can't see a rainbow without first experiencing the rain. Link to comment Share on other sites More sharing options...
bouncingmolar Posted October 26, 2008 Author Share Posted October 26, 2008 You would still use GUICtrlSetData. The data you pass would be generated from the control that was updated. I am not exactly sure how to grab that info, but I am sure it can be done - maybe ControlGetText or ControlGetFocus or combination.Good Luck.BobIs there an easier way to detect changes in the title other than creating a loop. eg. WhenWindowtitleChanges, Change Text to NewTitle Link to comment Share on other sites More sharing options...
bouncingmolar Posted October 26, 2008 Author Share Posted October 26, 2008 I just figured out a way to show a new msgbox when the window title changes for mozilla. $title = WinGetTitle("[Class:MozillaUIWindowClass]", "") MsgBox(0, "Full title read was:", $title) While WinExists($title) WEnd $title = WinGetTitle("[Class:MozillaUIWindowClass]", "") MsgBox(0, "Full title read was:", $title) Now I just need to make it update a GUI instead of making a separate msgbox Link to comment Share on other sites More sharing options...
bouncingmolar Posted October 26, 2008 Author Share Posted October 26, 2008 Sorry for being a Noob, but I figured out how to do what I wanted with (using Mozilla firefox as the program to test for title bar name changes) #include <GUIConstantsEx.au3> $mainwindow = GUICreate("Window Label", 500, 100) $title = WinGetTitle("[Class:MozillaUIWindowClass]", "") GUICtrlCreateLabel($title, 30, 10) GUISwitch($mainwindow) GUISetState(@SW_SHOW) While 1 While WinGetTitle("[Class:MozillaUIWindowClass]", "") = $title $msg = GUIGetMsg(1) Select Case $msg[0] = $GUI_EVENT_CLOSE And $msg[1] = $mainwindow Exit EndSelect WEnd $title = WinGetTitle("[Class:MozillaUIWindowClass]", "") ControlSetText ("Window Label", "", "[CLASS:Static; INSTANCE:1]", $title) WEnd 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