Jump to content
Sign in to follow this  
bouncingmolar

showing realtime changes in window.

Recommended Posts

bouncingmolar

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 by bouncingmolar

Share this post


Link to post
Share on other sites
martin

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.

Share this post


Link to post
Share on other sites
YellowLab

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.

Share this post


Link to post
Share on other sites
bouncingmolar

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

Share this post


Link to post
Share on other sites
bouncingmolar

You could use an edit area that is constantly being updated.

Check out GUICtrlCreateEdit and GUICtrlSetData.

Good Luck.

Bob

Thanks bob. Thats ok for creating an edit area in a GUI and setting the text in the textbox

I 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

Share this post


Link to post
Share on other sites
YellowLab

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.

Share this post


Link to post
Share on other sites
bouncingmolar

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

Is there an easier way to detect changes in the title other than creating a loop. eg.

WhenWindowtitleChanges, Change Text to NewTitle

Share this post


Link to post
Share on other sites
bouncingmolar

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

Share this post


Link to post
Share on other sites
bouncingmolar

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

Share this post


Link to post
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
Sign in to follow this  

×