mIRC Home    About    Download    Register    News    Help

Print Thread
#39001 31/07/03 04:02 AM
C
C0ffeeMan
C0ffeeMan
C
whenever i do a /window -h , it should be the opposite of /window -w

they are hide/show button in taskbar, respectively.

but /window -h #channel will minimize the channel also, i don't want it to do that, because /window -n #channel should do that on it's own.

#39002 31/07/03 04:05 AM
Joined: Dec 2002
Posts: 1,253
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,253
window -hr #mIRC

#39003 31/07/03 04:13 AM
C
C0ffeeMan
C0ffeeMan
C
i fixed my own problem, becuase i had to hide it in the switchbar but not minimize it


but not restore windows that were already minimized (i'm cycling through alot of channels)

so here's my fix

alias hidetask {
if ($window($1).state == hidden) {
window -h $1
}
if ($window($1).state == normal) {
window -h $1 | window -r $1
}
}

#39004 31/07/03 04:50 AM
Joined: Dec 2002
Posts: 1,253
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,253
Why are you re-hiding windows that are already hidden?
Code:

alias hidetask {
  window                                         $&
    $iif($window($1-).state == minimized, -h,    $&
    $iif($window($1-).state == normal,    -hr,   $&
    $iif($window($1-).state == maximized, -hx))) $&
    $iif($2, $+(",$1-,"), $1)
}

Using this version, you can /hidetask Status Window or some other multi-word window name (like sends and gets), as well as channel, query, chat or fserve windows.

#39005 31/07/03 06:02 AM
Joined: Feb 2003
Posts: 2,737
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,737
mmm, sexy use of $iif and $&

What about this method?
Code:
alias hidetask {
  goto $window($$1-).state
  :minimized | window -h " $+ $1- $+ "  | return
  :normal    | window -hr " $+ $1- $+ " | return
  :maximized | window -hx " $+ $1- $+ " | return
  :hidden    | return
}


- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#39006 31/07/03 01:02 PM
Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
How about this? :tongue:
Code:
alias hidetask window $$replace($window($1-).state,hidden,$null,minimized,-h,normal,-hr,maximized,-hx) $iif($2," $+ $1-",$1)


The reason I use $iif() to check for a 2nd word is that /window does not like quotes around a DCC chat window name, so /window -h "=blah" doesn't work.

#39007 31/07/03 02:17 PM
Joined: Feb 2003
Posts: 2,737
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,737
/window does not like quotes around a DCC chat window name

Hmmm, thanks. Never noticed that.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#39008 31/07/03 10:16 PM
Joined: Jan 2003
Posts: 247
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Jan 2003
Posts: 247
instead of =nick you can use "Chat nick"

If i remember an old code from a switchbar, it works.

#39009 01/08/03 03:38 AM
S
ScatMan
ScatMan
S
why not just -ha instead of -hr and -hx ?


Link Copied to Clipboard