1. I'm not familiar with Delphi so excuse me if I get this wrong. $isalias(aliasname) returns $true if an alias exists, $false if it doesn't.

2. I have no idea (there is not a command to do this, but there might be a way to produce the same effect). There might be a way using the /sleep script, but I don't use it so hopefully someone else will answer..you could use a /timer (but it would be a few hundred times slower than using a while loop). Something similar to this was posted here which might help.