Sign in to follow this  
Followers 0
Rad

WinSetState = visible, enabled, and untouchable

5 posts in this topic

#1 ·  Posted (edited)

If $msg = $Button_Apply AND $refreshstate = 1 Then                                                  ;
        $state = WinGetState($windows[GUICtrlRead($List_Window)-31][0], "")                             ;
        If GUICtrlGetState($Checkbox_Enabled) = $GUI_CHECKED Then                                       ;
            WinSetState($windows[GUICtrlRead($List_Window)-31][0],"",@SW_ENABLE)                        ;
            msgbox(0,"test","true")                                                                     ;
        Else                                                                                            ;
            WinSetState($windows[GUICtrlRead($List_Window)-31][0],"",@SW_DISABLE)                       ;
        Endif                                                                                           ;
        If GUICtrlGetState($Checkbox_Visible) = $GUI_CHECKED Then                                       ;
            WinSetState($windows[GUICtrlRead($List_Window)-31][0],"",@SW_SHOW)                          ;
        Else                                                                                            ;
            WinSetState($windows[GUICtrlRead($List_Window)-31][0],"",@SW_HIDE)                          ;
        Endif                                                                                           ;
        If GUICtrlGetState($Checkbox_OnTop) = $GUI_CHECKED Then                                         ;
            WinSetOnTop($windows[GUICtrlRead($List_Window)-31][0],"",1)                                 ;
        Else                                                                                            ;
            WinSetOnTop($windows[GUICtrlRead($List_Window)-31][0],"",0)                                 ;
        Endif                                                                                           ;   
        If GUICtrlGetState($Slider_Trans) < 255 Then                                                    ;
            WinSetTrans($windows[GUICtrlRead($List_Window)-31][0],"",GUICtrlRead($Slider_Trans))        ;
        Endif                                                                                           ;
        If GUICtrlGetState($Radio_Max) = $GUI_CHECKED Then                                              ;
            WinSetState($windows[GUICtrlRead($List_Window)-31][0],"",@SW_MAXIMIZE)                      ;
        Else                                                                                            ;
            If GUICtrlGetState($Radio_Min) = $GUI_CHECKED Then                                          ;
                WinSetState($windows[GUICtrlRead($List_Window)-31][0],"",@SW_MINIMIZE)                  ;
            Else                                                                                        ;
                WinSetState($windows[GUICtrlRead($List_Window)-31][0],"",@SW_RESTORE)                   ;
            Endif                                                                                       ;
        Endif                                                                                           ;
    Endif

I got to work on my program and got the array thing figured out, for some reason GUICtrlCReateListView seems to add each letter in the "Area1|Area2" to its GUICtrlRead() data, which is why i used $List_Window-31.

Now I can post the entire code, but this DOES effect the window, it applies transparencies right but seems to bug it up a bit. The window flashes and the button on ur start bar moves, then it like it freezes altogether and u cant highlight buttons or move it or anything

I think i might have changed the windows attributes in a bad way, any suggestions to fix this? Its supposed to apply any settings to the selected window

o and the comment things ((if)) i have to upload the script will be the area i need help with

and the variables:

$windows[GUICtrlRead($List_Window)-31][0] = 2d array created with Winlist() function

$Checkbox_OnTop = a checkbox (same for all $Checkbox_xxx)

$Radio_Max = a radio button (same for all $Radio_xxx)

$Slider_Trans = a slider bar with limit set to 255

they are easy to understand see? :whistle:

Edited by Rad

Share this post


Link to post
Share on other sites



If $msg = $Button_Apply AND $refreshstate = 1 Then                                              ;
        $state = WinGetState($windows[GUICtrlRead($List_Window)-31][0], "")                         ;
        If GUICtrlGetState($Checkbox_Enabled) = $GUI_CHECKED Then                                   ;
            WinSetState($windows[GUICtrlRead($List_Window)-31][0],"",@SW_ENABLE)                    ;
            msgbox(0,"test","true")                                                                 ;
        Else                                                                                        ;
            WinSetState($windows[GUICtrlRead($List_Window)-31][0],"",@SW_DISABLE)                   ;
        Endif                                                                                       ;
        If GUICtrlGetState($Checkbox_Visible) = $GUI_CHECKED Then                                   ;
            WinSetState($windows[GUICtrlRead($List_Window)-31][0],"",@SW_SHOW)                      ;
        Else                                                                                        ;
            WinSetState($windows[GUICtrlRead($List_Window)-31][0],"",@SW_HIDE)                      ;
        Endif                                                                                       ;
        If GUICtrlGetState($Checkbox_OnTop) = $GUI_CHECKED Then                                     ;
            WinSetOnTop($windows[GUICtrlRead($List_Window)-31][0],"",1)                             ;
        Else                                                                                        ;
            WinSetOnTop($windows[GUICtrlRead($List_Window)-31][0],"",0)                             ;
        Endif                                                                                       ;   
        If GUICtrlGetState($Slider_Trans) < 255 Then                                                ;
            WinSetTrans($windows[GUICtrlRead($List_Window)-31][0],"",GUICtrlRead($Slider_Trans))    ;
        Endif                                                                                       ;
        If GUICtrlGetState($Radio_Max) = $GUI_CHECKED Then                                          ;
            WinSetState($windows[GUICtrlRead($List_Window)-31][0],"",@SW_MAXIMIZE)                  ;
        Else                                                                                        ;
            If GUICtrlGetState($Radio_Min) = $GUI_CHECKED Then                                      ;
                WinSetState($windows[GUICtrlRead($List_Window)-31][0],"",@SW_MINIMIZE)              ;
            Else                                                                                    ;
                WinSetState($windows[GUICtrlRead($List_Window)-31][0],"",@SW_RESTORE)               ;
            Endif                                                                                   ;
        Endif                                                                                       ;
    Endif

I got to work on my program and got the array thing figured out, for some reason GUICtrlCReateListView seems to add each letter in the "Area1|Area2" to its GUICtrlRead() data, which is why i used $List_Window-31.

Now I can post the entire code, but this DOES effect the window, it applies transparencies right but seems to bug it up a bit. The window flashes and the button on ur start bar moves, then it like it freezes altogether and u cant highlight buttons or move it or anything

I think i might have changed the windows attributes in a bad way, any suggestions to fix this? Its supposed to apply any settings to the selected window

o and the comment things ((if)) i have to upload the script will be the area i need help with

and the variables:

$windows[GUICtrlRead($List_Window)-31][0] = 2d array created with Winlist() function

$Checkbox_OnTop = a checkbox (same for all $Checkbox_xxx)

$Radio_Max = a radio button (same for all $Radio_xxx)

$Slider_Trans = a slider bar with limit set to 255

they are easy to understand see? :whistle:

just attach the file. difficult to help you :)

Share this post


Link to post
Share on other sites

aww but i didnt want to lol i figured i just made a stupid mistake >_>

nobody steal it im gonna make lots of money off it :whistle: lol

is it legal to sell programs made with au3? i doubt i ever will but it would be interesting to know >_>

Window_Property_Settings.au3

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

oh and i wouldnt test this on a window id open notepad and test it u might mess up your comp (And i accept no responsibility lol >.>)

and no it is not a virus of any kinda just when u push refresh click the untitled - notepad button and click apply

Edited by Rad

Share this post


Link to post
Share on other sites

:whistle: thanks for the help

it was pretty simple but I didnt realize it

I changed:
If GUICtrlGetState($Checkbox_Enabled) = $GUI_CHECKED Then

to:
If GUICtrlRead($Checkbox_Enabled) = $GUI_CHECKED Then

and it worked fine. And the window freezing up was the disabled attribute... which made perfect sense lol

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