mIRC Home    About    Download    Register    News    Help

Print Thread
#244614 14/03/14 02:07 PM
Joined: Jul 2004
Posts: 9
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Jul 2004
Posts: 9
I have this in my script which works fine:
alias xdcc_stats { /window -k[0] @ServerStats 20 20 400 250
.echo @ServerStats 11############ 9XDCC Server Stats 11############
.echo @ServerStats 11Number of XDCC list : $+ 9 $xdcc(access)
.echo @ServerStats 11Number of XDCC send : $+ 9 $xdcc(sent)
.echo @ServerStats 11Number of successfull send : $+ 9 $xdcc(fullsent)
.echo @ServerStats 11############ 9XDCC Server Stats 11############
}
The question is, how do I add a switch to make the text in the new window aline to the top of the window as I've tried all ways and can't seem to nail it.
Thanks in advance, Pete.

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Hmm I can't remember how to do that, it may be possible by using a listbox.

How about using something like this:
Code:
alias xdcc_stats {
  var %wn = @ServerStats
  $iif($window(%wn),clear %wn,window -k0 %wn 344 167 383 126)
  .echo %wn 11############ 9XDCC Server Stats 11############
  .echo %wn 11Number of XDCC list : $+ 9 $xdcc(access)
  .echo %wn 11Number of XDCC send : $+ 9 $xdcc(sent)
  .echo %wn 11Number of successfull send : $+ 9 $xdcc(fullsent)
  .echo %wn 11############ 9XDCC Server Stats 11############
}


I set a variable for the custom window for less clutter.
I changed the size of the window so the echoed text fits exactly inside it.
I added an $iif() identifier to check if the window is open or not. If it is open the window gets cleared, if its not open it will open.

Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Changing the size of the window is not a good idea here: if you're not defining the font and the font size for the window, you have no idea if the original size wasn't already working for him, nor you can tell that the new size you choose will work for him


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
True, I was just going by the look of my standard mIRC I downloaded earlier. Obviously there'll be better methods its just something quick and in any case it should be fine if he edits it to meet his font needs so it is like the picture with the 4 lines echoed that fit inside nicely.


Link Copied to Clipboard