mIRC Home    About    Download    Register    News    Help

Print Thread
#183087 17/08/07 05:12 PM
Joined: Aug 2006
Posts: 7
G
Grover Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Aug 2006
Posts: 7
I've been using "scid 1 blah", "scid 2 blah", etc for doing various startup commands, and now I see the $cid's are all over the place.

Is this is a bug, or am I not trying hard enough? I can't seem to figure out how to get the $CID of the second and third open server windows, but I thought thats exactly what $cid was for..

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Connection IDs are unique identifiers for the connection, they are not supposed to be in a particular order.

What you're after is possible with $scon() though:

//echo -a First CID: $scon(1).cid | echo -a Second CID: $scon(2).cid

Joined: Nov 2004
Posts: 842
Hoopy frood
Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
I think they are. (Same with window ids.)

My currently layout is:

Quote:

Connection ID/Window ID

1/20 (S)
1/51-52

21/25 (S)
21/53-62

26/30 (S)
26/63

31/35 (S)
31/64

36/40 (S)
36/64

41/45 (S)
41/66-68

46/50 (S)


What do you do at the end of the world? Are you busy? Will you save us?
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
They're not broken *sigh*

Originally Posted By: /help /scon
The /scon command works in exactly the same way, except that N represents the Nth connection, not a connection id value.


/scon is used for doing what the OP thought /scid was for. /scon takes a connection NUMBER, /scid takes a connection ID.

Joined: Aug 2006
Posts: 7
G
Grover Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Aug 2006
Posts: 7
That clears things up completely. I've actually learned a few things about the Connection ID's from this thread that may help clear some other confusion I have in some script.

Thanks!

Joined: Nov 2004
Posts: 842
Hoopy frood
Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
How're they not broken?

Look.


What do you do at the end of the world? Are you busy? Will you save us?
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Because the connection ID was only ever supposed to be used to identify a connection. It was never stated that they must be in order. Even though the behaviour has changed from 6.21, that does not mean it has broken, because the connection ID was never supposed to indicate a connection number.

What's so hard to understand? Each connection is given a unique identifier so that you can identify that connection. This identifier is known as the connection ID, or CID. It does not have to increment with each connection, it just has to be unique. The same applies for window IDs. Even if they DO increment with each one, they do not have to; they just have to identify a window and be unique.

Last edited by hixxy; 17/08/07 06:03 PM.
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
I don't get what you're trying to point out. That they're not in sequence? They're not meant to be. They're IDs, as in identifiers. They don't have to have any kind order or be sequential, the only defining characteristic is that they're unique for each instance of mIRC so that if you refer to a window by it's ID you will never get any other window.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Aug 2006
Posts: 7
G
Grover Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Aug 2006
Posts: 7
My confusion was that they WERE in order.

I didn't realize I was misusing them. Seeing the differences in scon and scid, I can see how this is a very powerful distinction. I can also see others that are going to have the same problem with the change, even if it is a good move.

A note in the versions.txt would be nice.



Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
It may not even be intentional, but possibly a side effect of another change. The point is that they don't have to be in any order as long as each id is unique. I fail to see why anyone would consider it broken. Different? Yes. Broken? Absolutely not.

Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Originally Posted By: RoCk
I fail to see why anyone would consider it broken. Different? Yes. Broken? Absolutely not.

I think what Grover is saying that many people mis-used the CID with the incorrect asumption that they were sequential.

What these people are going to see is that their scripts broke because of the change in behaviour, and consider it a bug.


Link Copied to Clipboard