Jump to content

Need help


Recommended Posts

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

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...