Sign in to follow this  
Followers 0
GrungeRocker

Need help

3 posts in this topic

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]

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by Lazycat

Share this post


Link to post
Share on other sites

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]

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  
Followers 0