cyanidemonkey Posted December 25, 2005 Share Posted December 25, 2005 Hi,I'd like my GUI to check users IP addy, triggered when they select a checkbox.As the function is checking I want to replace the text with "checking..." and then have the function return the IP addy to the GUI.This all should work using the ControlSetText (and does), but if the text being changed is within a tab it just places the text over the top of the text it should replace.After some testing with the code below, recreating my main GUI code one step at a time in reverse I was able to narrow it down to the tab causing the problem.Has anyone came across this and know of a work around?expandcollapse popup#include <GUIConstants.au3> Opt("GUIOnEventMode", 1) $PublicIP = " " GUICreate("ControlSetText",600, 400) $tab=GUICtrlCreateTab (10,10, 580,345) ;-------------Hosting--------------- $tab0=GUICtrlCreateTabitem ( "Hosting") GUICtrlCreateGroup (" IP Monitor ", 310, 120, 270, 60) $IPMSwitch = GUICtrlCreateCheckbox ("", 322, 122, 10, 10) GUICtrlSetOnEvent($IPMSwitch, "Change") $IPMText1 = GUICtrlCreateLabel("Your current IP Address is: ", 320, 140) $IPMText2 = GUICtrlCreateLabel($PublicIP, 450, 140) GUICtrlCreateGroup ("",-99,-99,1,1) ;close group GUICtrlCreateTabitem ("") ; end tabitem definition GUISetState() While 1 Sleep(1000) Wend Func Change() ControlSetText("ControlSetText", " ", "Static2", "checking....") Sleep(1000) $PublicIP = Change2() ;ControlSetText("ControlSetText", "checking....", "Static2", "DONE!") ControlSetText("ControlSetText", "checking....", "Static2", $PublicIP) EndFunc Func Change2() ;get IP code here Return "DONE!" EndFunc My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator Link to comment Share on other sites More sharing options...
cyanidemonkey Posted December 27, 2005 Author Share Posted December 27, 2005 (edited) Installing the autoit-v3.1.1.98 beta has fixed it.However text boxes no longer go grey when set to $GUI_DISABLERegarding the text box not going grey issue, I see it was a bug that was fixed in 3.1.1.84http://www.autoitscript.com/forum/index.php?showtopic=16848Has it come back in 3.1.1.98? Edited December 27, 2005 by cyanidemonkey My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator 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