umm why not just use
menu nicklist { Host .Add host:/write host.txt $1 $address($1,1) .open:/run host.txt }