Not exactly what you asked for but I will explain what this does.
When your status changes to busy the timer starts. After 20 minutes it will send the first message to all open windows. After 5 minutes the next message is sent. However the second message is only sent every 25 minutes.
Javascript code:
var objMessages = { 0 : 'First Message',
1 : 'Send Message',
};
function OnEvent_MyStatusChange ( nStatus ) {
if ( nStatus === STATUS_BUSY ) {
MsgPlus.AddTimer ( 0 , 1200000 ); // 1000 (miliseconds) * 60 (seconds) * 20 (minutes)
}
}
function OnEvent_Timer ( sTimer ) {
SendMessage ( objMessages [ sTimer ] , Messenger.CurrentChats );
if ( sTimer === 0 ) {
MsgPlus.AddTimer ( 1 , 300000 ); // 1000 (miliseconds) * 60 (seconds) * 5 (minutes)
} else if ( sTimer === 1 ) {
MsgPlus.AddTimer ( 0 , 1200000 ); // 1000 (miliseconds) * 60 (seconds) * 20 (minutes)
}
}
function SendMessage ( sText , oChatWnds ) {
for ( var oChatWnd = new Enumerator ( oChatWnds ); !oChatWnd.atEnd(); oChatWnd.moveNext() ) {
if ( oChatWnd.item().EditChangeAllowed === true ) {
oChatWnd.item().SendMessage ( sText );
}
}
}