mIRC Home    About    Download    Register    News    Help

Print Thread
#35700 11/07/03 11:29 AM
Joined: Dec 2002
Posts: 292
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 292
Hi all, was wondering if someone could help me with this problem please ?

Ok, i found a website with an example of using ktools.dll, and so i copied it to add to my own statusbar, everythinhs works, from telling me how many DCC`s im sending/recieving to my system uptime changing, so i added an extra cell marked in Red the cell shows the text "Nicks in channel" but doesnt however show how many nicks are in the channel, i have a script that somebody from the old boards helped me with that will count how many nicks are in the channel i`m in and how many are op`s, voiced, or normal and i also found the following info in the mirc help file.

Quote:
$nick(#mIRC,0) returns the the total number of nicknames on #mIRC
$nick(#mIRC,1) returns the 1st nickname on #mIRC

Both aohvr parameters are optional. The first specifies which nicks you'd like included, and the second specifies the nicks you'd like excluded, where:

a = all nicks, o = ops, h = halfops, v = voiced, r = regular

$nick(#mIRC,1,o) return the first op on #mIRC
$nick(#mIRC,0,a,o) return the total number of nicks not including ops on #mIRC



My statusbar code
Code:
alias statusbar {
  dll ktools.dll SbSetText 0 >  > $chr(160) Connected to : $iif($scid($activecid).server != $null,$scid($activecid).server,Not Connected) 
  dll ktools.dll SbSetText 1 >  > $chr(160) Nickname : $me
  dll ktools.dll SbSetText 2 >  > $chr(160) System uptime : $uptime(system,1)
  dll ktools.dll SbSetText 3 >  > $chr(160) DCC gets( $+ $get(0) $+ )/sends( $+ $send(0) $+ )
[color:red]  dll ktools.dll SbSetText 4 >  > $chr(160) Nicks in channel: $nick(#,0,a)[/color] 

}
   on *:start: {
  dll ktools.dll CreateSb
  dll ktools.dll  SbSetParts 200 375 600 800 -1
  dll ktools.dll  SbSetPadding 5
  .timer 0 1 statusbar
}


What i want to know is why doesnt the last cell, containing the number of nicks in that channel work ?, when i have a similar script that does work, and contains no conflicts, the only difference between the ktools status bar and my power script is that i have to use the right mouse button in the main chat screen to launch my power script.

Here is an example screenshot of my "Power Script" and the corner of my KTools Statusbar


Thanks in advance for any help
ShadowDemon
mIRC V6.03

#35701 11/07/03 11:32 AM
P
pheonix
pheonix
P
$nick(#,0,a) is saying everyone apart from everyone,if you know what i mean, use $nick(#,0)

#35702 11/07/03 11:36 AM
Joined: Dec 2002
Posts: 292
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 292
Umm thanks Pheonix, but that still not working, even after changing it to what you just told me.

#35703 11/07/03 12:49 PM
P
pheonix
pheonix
P
$nick($active,0)

#35704 11/07/03 03:47 PM
Joined: Dec 2002
Posts: 292
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 292
Got it, thanks Pheonix it works now, i knew it musta been sumthing simple that i overlooked

#35705 11/07/03 03:59 PM
P
pheonix
pheonix
P
change all of the #'s to $active because in a dialog theres no such thing as $chan

#35706 11/07/03 04:06 PM
Joined: Dec 2002
Posts: 292
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 292
Umm ok whatever, i got it working now and there was just the one # i had probs with.

I`ll remember that for next time i try to script something tho


Link Copied to Clipboard