It sounds like you want to have an alias that checks your $idle value against what you are setting in the dialog.
When the dialog is intialized you would set a timer to call an alias that checks $idle to your setting, and if its > your setting, triggers your aliase that sets you /away using the messages you have in the dialog.
The On Dialog event
If a user changes the state of controls in the dialog, eg. clicks on a button, types text in an edit box, etc., this triggers the on dialog script event which allows you to monitor input from the user:
on 1:dialog:name:event:id: {
echo $dname $devent $did
}
Where name identifies the dialog, id is the id number of the control triggering the event, and event can be:
init just before a dialog is displayed, controls can be initialized in this event. id is zero
on 1:dialog: name:INIT:0: {