You don\'t seem to error check, ( something like an if ($did(3).text) for example ) and it\'s rather simple. But, it gets the job done I suppose. Perhaps an alias to check if the dialog is in use? Here try this,
alias awayopen { dialog $iif(!$dialog(BioAway),-m,-v) bioaway bioaway
And just put awayopen in the menu. ;)