Baku Posted August 6, 2005 Posted August 6, 2005 Hi guys, someone asked me to create a little tool. It should show the time of a country. It's actually easy, but i've got a little problem with the Gui-Idling loop. Look at this: $countrycombo is a Combobox with Countries $refbut is a button to refresh the time While 1 $msg = GuiGetMsg() $country = GuiCtrlRead($countrycombo) Select Case $country = "United Kingdom" GuiCtrlSetData($zeitlab, @HOUR - 1 & ":" & @MIN) Case $msg = $refbut GuiCtrlSetData($timelab, $time) Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit Now, if i choose United Kingdom in the Combo it refreshs all the time and i cant exit the app. Thats actually what it SHOULDN'T do. It just should do the case one time. I already tried to add a Continueloop, but it didnt worked too. So, someone got ideas ? Yaya, i'm a damn noob, i kno Thanks in advance
Josbe Posted August 6, 2005 Posted August 6, 2005 Check and compare the small changes: While 1 $msg = GuiGetMsg() ;;;;;; unnecessary line if you has $MSG --> $country = GuiCtrlRead($countrycombo) Select Case $msg = $countrycombo $sCountry = GUICtrlRead( $msg ) If $sCountry = "United Kingdom" Then GuiCtrlSetData($zeitlab, @HOUR - 1 & ":" & @MIN) Case $msg = $refbut GuiCtrlSetData($timelab, $time) Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
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