faldo Posted July 3, 2006 Share Posted July 3, 2006 Is there a way to retrace the GUI with new information from updated variables? For example, i need to read a value in an ini file and display it in realytime: #include <GUIConstants.au3> $var = IniRead("C:\Temp\myfile.ini", "section2", "key", "NotFound") GUICreate("My GUI", -1, -1, -1, -1, -1 ) GUICtrlCreateLabel ($var, 20,50) GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Once i change the value in the ini file i want my GUI to pick it up and display it. Is this possible? Check out my other scripts: RDP antihammer/blacklist generator | Phemex cryptocurrency exchange API Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 3, 2006 Share Posted July 3, 2006 Hi, you have to read it again and then GuiCtrlSetData() on the label. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
faldo Posted July 5, 2006 Author Share Posted July 5, 2006 aha... read it again and GuiCtrlSetData()... would you mind altering my script to show what you mean? Thanx in advance. Check out my other scripts: RDP antihammer/blacklist generator | Phemex cryptocurrency exchange API Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 5, 2006 Share Posted July 5, 2006 Hi, try this: #include <GUIConstants.au3> $var = IniRead("C:\Temp\mega.ini", "Mega", "1", "NotFound") GUICreate("My GUI", 150, 100, 5, 5) $read_B = GUICtrlCreateButton("Read again", 10, 10, 100, 30) $var_L = GUICtrlCreateLabel ($var, 10, 50, 100, 20, $SS_SUNKEN) GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select case $msg = $GUI_EVENT_CLOSE ExitLoop case $msg = $read_B GUICtrlSetData($var_L, IniRead("C:\Temp\mega.ini", "Mega", "1", "NotFound")) EndSelect Wend So long, Mega ponty 1 Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times 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