GrungeRocker Posted May 15, 2005 Share Posted May 15, 2005 hi cold you pls help me? i've got problems with this small script #include <GuiConstants.au3> GuiCreate("Config", 330, 112,(@DesktopWidth-330)/2, (@DesktopHeight-112)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Slider = GuiCtrlCreateSlider(0, 40, 320, 40) GUICtrlSetLimit ( $slider, 255 , 0) GUICtrlSetData($slider,$max) $Label_2 = GuiCtrlCreateLabel("Config the Transparency of the Traywindow:", 10, 10, 320, 30) $Button_3 = GuiCtrlCreateButton("OK", 100, 80, 120, 30) $test1 = 0 $loop2 = 0 $msg = GUIGetMsg() GuiSetState() Do $test1 = GUICtrlRead($slider) If $max <> $test1 then winsettrans("Config", "", $max) $max = $test1 endif until $msg = $button_3 msgbox(0,"","") $max = GUICtrlRead($slider) GUISetState(@sw_hide) endfunc it seems that it doesnt get out of the loop.. but how can this be changed? [font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font] Link to comment Share on other sites More sharing options...
Lazycat Posted May 15, 2005 Share Posted May 15, 2005 (edited) You place GUICtrlGetMsg not inside loop, so it not react to button. #include <GuiConstants.au3> GuiCreate("Config", 330, 112,(@DesktopWidth-330)/2, (@DesktopHeight-112)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Slider = GuiCtrlCreateSlider(0, 40, 320, 40) GUICtrlSetLimit ( $slider, 255 , 0) ;$max = 50 GUICtrlSetData($slider,$max) $Label_2 = GuiCtrlCreateLabel("Config the Transparency of the Traywindow:", 10, 10, 320, 30) $Button_3 = GuiCtrlCreateButton("OK", 100, 80, 120, 30) $test1 = 0 $loop2 = 0 GuiSetState() Do $msg = GUIGetMsg() $test1 = GUICtrlRead($slider) If $max <> $test1 then winsettrans("Config", "", $max) $max = $test1 endif until $msg = $button_3 msgbox(0,"","") $max = GUICtrlRead($slider) GUISetState(@sw_hide) Edited May 15, 2005 by Lazycat Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
GrungeRocker Posted May 15, 2005 Author Share Posted May 15, 2005 thx for your help...my little prgram is free to be downloaded here [font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font] 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