Sign in to follow this  
Followers 0
qazwsx

record variables without ini

7 posts in this topic

#1 ·  Posted (edited)

Func _hide()
    MsgBox(0, "", "hide")
    $list = WinList()
    For $i = 1 To $list[0][0]
        If $list[$i][0] <> "" And $list[$i][0] <> "Program Manager" And _IsVisible($list[$i][1]) Then
            WinSetState($list[$i][1], "", @SW_HIDE)
        EndIf
    Next
    Sleep (1)
EndFunc ;==>_hide

Is there a way to record which $list[$i][0] meet the if statement without the use of an ini file?

Edited by sccrstvn93

Share this post


Link to post
Share on other sites



Sorry, I don't see an INI file referenced in this code.


BlueBearrOddly enough, this is what I do for fun.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

yeh i havent used an ini but i want to record each of the arrays (i dunno wat to call them, not the whole array just one of them) that meets the if criteria without using an ini file.

Edit: i need to use them later in the program.

Edited by sccrstvn93

Share this post


Link to post
Share on other sites

Thats wat i was thinking but dont you have to have the array defined before you can use it?

Share this post


Link to post
Share on other sites

Thats wat i was thinking but dont you have to have the array defined before you can use it?

dim $NewArray [ ubound($OldArray)]

for $i = 0 to ubound($NewArray) - 1
     $NewArray[$i] = $OldArray[$i]
next

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Thx orange i have been trying to figure out how to do that for a long time.

For some reason its not bringing the windows back.

Func _hide()
    MsgBox(0, "", "hide")
    $list = WinList()
    Global $NewArray [UBound ($list)];;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    For $i = 1 To $list[0][0]
        If $list[$i][0] <> "" And $list[$i][0] <> "Program Manager" And _IsVisible($list[$i][1]) Then;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
            WinSetState($list[$i][1], "", @SW_HIDE)         
            $NewArray[$i] = $list[$i][1];;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
        EndIf
    Next    
EndFunc ;==>_hide

Func _show()
    MsgBox(0, "", "show")
    For $i = 0 To $list[0][0] - 1
                WinSetState($NewArray[$i], "", @SW_SHOW);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;    
    Next
EndFunc ;==>_show

It hides them fine. But I don't think the handles are not recorded properly into the new variable

Edited by sccrstvn93

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