Just to expand on what Wims has said, I'd suggest that when using the /scon or /scid, you should use it in one of two ways:

1.) Use "/scid N somealias" then make an alias "/somealias" to do what you want. This will avoid a few of the problems that are harder to anticipate.

2.) Use "/scid N", then on the next line do your if statement. (If you want to return to the original cid after that, you need to use "/scid -r".)