Sign in to follow this  
Followers 0
mmavipc

script not working.

3 posts in this topic

I'm trying to make a script that acts like gnome and makes it so I can have a few windows open then press a button then get those windows to be set at @SW_HIDE and the windows on the other desktop get set to @SW_SHOW.

code:

Global $cwin
Global $cwin2
Global $curwin
Global $chd = 1
HotKeySet("^n","chd")
Global $i
while 1
    check()
WEnd
func check()
    $listwin = winlist()
    if 2 < $listwin[0][0] then
        for $i = 2 to $listwin[0][0] - 1
            if $chd = 1 Then
                $cwin = ""
                $cwin = $listwin[1][0]
                if $i =< 2 Then
                    $cwin = $cwin & "|" & $listwin[$i][0]
                EndIf
            Else
                $cwin2 = ""
                $cwin2 = $listwin[1][0]
                if $i =< 2 Then
                    $cwin2 = $cwin & "|" & $listwin[$i][0]
                EndIf
            EndIf
        Next
    EndIf
EndFunc
func chd()
    if $chd = 1 Then
        $cwintemp = stringsplit($cwin,"|")
        msgbox(0,"",$cwintemp[0])
        for $i = 1 to $cwintemp[0]
            msgbox(0,"",$cwintemp[$i])
        Next
        if $cwintemp[1] <> "" then
            for $i = 1 to $cwintemp[0]
                WinSetState($cwintemp[$i],"",@SW_HIDE)
            Next
        EndIf
        $cwintemp2 = StringSplit($cwin2,"|")
        if $cwintemp2[1] <> "" Then
            for $i = 1 to $cwintemp2[0]
                WinSetState($cwintemp2[$i],"",@SW_SHOW)
            Next
        EndIf
        $chd = 2
    Else
        $cwintemp2 = stringsplit($cwin2,"|")
        if $cwintemp2[1] <> "" then
            for $i = 1 to $cwintemp2[0]
                WinSetState($cwintemp2[$i],"",@SW_HIDE)
            Next
        EndIf
        $cwintemp = StringSplit($cwin,"|")
        if $cwintemp[1] <> "" Then
            for $i = 1 to $cwintemp[0]
                WinSetState($cwintemp[$i],"",@SW_SHOW)
            Next
        EndIf
        $chd = 1
    EndIf
EndFunc

scite error:

C:\Documents and Settings\Maverick\My Documents\massive soft\MassiveVD\mvd.au3(17,12) : ERROR: syntax error

if $i =<

~~~~^

autoit error:

line 17 (file "blablabla"):

if $i =< 2 Then

if ^ ERROR

error: error in expression.

But I cant find a error. Please Help


[size="10"]Pure Au3 crypt funcs(I'm currently also working on making a dll from this)[/size][Y] Be more active in the community[Y] Get 200 posts[N] Get 300 posts[N] Make a Topic in the example scripts forum with at least 50 replies.People who currently hate me:ValikSmOke_N

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