mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 4
U
Self-satisified door
OP Offline
Self-satisified door
U
Joined: Jan 2003
Posts: 4
/scid <-rsatM | N> [command]
Changes the active connection for a script to connection id N, where N is a $cid value.

All commands after the /scid command will be performed on the new connection id.
... ... ...

i dont see any function to return a variable, ore alias..
i want to see something like this: $scid(N,%var/$alias)
(:


-- UnKnownD --
Joined: Dec 2002
Posts: 46
L
Ameglian cow
Offline
Ameglian cow
L
Joined: Dec 2002
Posts: 46
$scid(N)[.id]
Returns the connection id, where N is a $cid value.

If N = 0, returns total number of open server windows.

If you specify a property which is an identifier, it returns the value of that identifier for that connection. This also works for custom identifiers.

Note: The property cannot use brackets.
-----------------
by brackets it means stuff like $chan(0)

examples: $scid(2).me, $scid(11).chans [custom identifier]
-----------------
if you want something more like your idea, you could try this out (note: returning a variable using this is pointless as variables are the same for all connections):

Code:
alias scideval {
  scid $1 return $eval($!2,2)
}

example: echo -a $scideval(11,$!ng.me)
note: you need the ! in the example or $ng.me would be evaulated before it got to $scideval


evil is in the eye of the beholder
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Assume:
$scon(1).server == kernel-c.nj.us.dal.net
$scon(1).network == DALnet
%variable1 = Khaled
%variable2 = Hammer
Code:

alias myAlias return $gettok($server,-2-,46)
alias variable1 return %variable1 on $network
alias variable2 return %variable2 on $chans
alias chans var %s, %i = 1 | while ($chan(%i)) { %s = %S $ifmatch | inc %i } | return %s
  • $scon(1).myAlias returns dal.net
  • $scon(1).variable1 returns Khaled on DALnet
  • $scon(1).variable2 returns Hammer on #mIRC #HelpDesk
And yes, I realize that these are workarounds to what you want. I thought when this idea first came out that it'd be quite nice to be able to do something like:
  • $scon(2).send(3).file
  • $scon(4).myCustomIdentifier($nick,$server,$me,$chan).property
cool


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Joined: Jan 2003
Posts: 4
U
Self-satisified door
OP Offline
Self-satisified door
U
Joined: Jan 2003
Posts: 4
maby i'll just read a little better next time.. (:


-- UnKnownD --
Joined: Jan 2003
Posts: 6
P
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
P
Joined: Jan 2003
Posts: 6
I would like to suggest the ability to use properties with brackets when using the $scid and $scon identifiers.

For example, $scon(3).chan(2).status

/ pDude

Joined: Dec 2002
Posts: 46
L
Ameglian cow
Offline
Ameglian cow
L
Joined: Dec 2002
Posts: 46
With the time Khaled took to add all the multiserver capabilities, I'm sure he would have added the ability to use properties with brackets if he felt it was *necessary*.

using my scideval alias from before:
echo -a $scideval(11,$!chan(3).status)


evil is in the eye of the beholder

Link Copied to Clipboard