using echo rather than return, the following worked well in my status window
alias hd {
var %dz = 99
var %dcnt = $disk(0) + %dz
while ( %dz < %dcnt ) {
if ($disk($chr(%dz)).type == cdrom) { echo 3 -s Disk $upper($chr(%dz)) - CD-Rom }
else echo -s Disk $upper($chr(%dz)) - $bytes($disk($chr(%dz)).size,g) GB
inc %dz
}
}When I had %dz <= 122, I got an 'insufficient parameters' error for non-existent drives.
Don't need $calc with $bytes.
It appears size for CDrom drives is always 0.
In your last post you didn't have all your variables changed to %x (typo?)
hth