|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
I have this loaded in a dialog, how ever i have one problem, i don't want it to show the Status Window, and im not able to hide it from the dialog, the line I talking about are this one: var %dontshow = @verch.1 @tb.button @tb.sep2 @tb.button2 @tb.button3 @tb.button4 @tb.button5 @tb.button6 @setu.button I tested to add "Status Window" to it, still listed, then i tested: if ($window(*,%a).state == hidden) && ($window(*,%a).state != Status Window) { did -a listhidden 5 $window(*,%a) } but it get listed anyway, how can i sole this?
alias listhidden {
did -r listhidden 3,5
var %dontshow = @verch.1 @tb.button @tb.sep2 @tb.button2 @tb.button3 @tb.button4 @tb.button5 @tb.button6 @setu.button
var %a = $window(*,0)
while (%a) {
if (!$istok(%dontshow,$window(*,%a),32)) {
if ($window(*,%a).state == hidden) { did -a listhidden 5 $window(*,%a) }
else { did -a listhidden 3 $window(*,%a) }
}
dec %a
}
}
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Jul 2006
Posts: 4,151
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,151 |
Add "Status window" to %dontshow won't work because the variable is space separated... And you second condition is wrong because you're checking $window().State and it will always be different of "Status Window" Use : if ($window(*,%a).state == hidden) && ($window(*,%a) != Status Window) Should work
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Close, but you still need to put quotes around the words Status Window otherwise the window referenced will only be Status
|
|
|
|
Joined: Jul 2006
Posts: 4,151
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,151 |
i don't need to put any quote, or at least tell me where ? I've just change his /if condition. I notice that you often post useless message like that, that doesn't help more.
Last edited by Wims; 07/09/08 10:31 PM.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
From your response to my post i don't need to put any quote, or at least tell me where ? From my post put quotes around the words Status Window Amended code if ($window(*,%a).state == hidden) && ($window(*,%a) != "Status Window") Since I am able to quote from my post the information that you requested, my post does not contain a useless message that doesn't help.
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
Thnx for the help, but no luck to hide Status Window from the dialog. I't still show as befor, code i tested:
if ($window(*,%a).state == hidden) && ($window(*,%a) != Status Window)
if ($window(*,%a).state == hidden) && ($window(*,%a) != "Status Window")
so dunno how to do it..
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
$window() never returns window names enclosed in quotes (you could have simply tried this) so using quotes in v2 of the statement will actually break it.
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
Assuming you meant that you don't want Status to be listed in neither of the lists 3 and 5, you can simply change this:
if (!$istok(%dontshow,$window(*,%a),32)) {
to this:
if (!$istok(%dontshow,$window(*,%a),32) && $window(*,%a) != status window) {
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
Thnx, i test it
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Jul 2006
Posts: 4,151
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 4,151 |
By useless message I meant that you said false statement (see qwerty's post).I don't want to be offensive, but I don't see why you said something you're not sure about, in general.
#mircscripting @ irc.swiftirc.net == the best mIRC help channel
|
|
|
|
|