Bertel Lund Hansens hjemmeside

Event script utilities

GetNewMessagesAndEmails (OnStartup)

This script makes sure that Dialog gets all new messages in all subscibed groups and all new emails when it is started.

Program GetNewMessagesAndEmails (OnStartup);

Procedure OnStartup;
begin
 //News
 ADo('GetNewHeadersInSubscribedGroups');
 //Mails
 ADo('GetNewEmailsForAllIdentities');
end;

Begin
End.

If you combine it with the two timer routines, the get can be performed automatically at specified intervals. In that case you need the following routine instead.

Program GetNewMessagesAndEmails (OnStartup);

Procedure OnStartup;
begin
 //News: interval 5 seconds
 ADo('GetNewHeadersInSubscribedGroups');
 timer1.interval:=60000*5;
 timer1.enabled:=true;
 //Mails: interval 5 seconds
 ADo('GetNewEmailsForAllIdentities');
 timer2.interval:=60000*5;
 timer2.enabled:=true;
end;

Begin
End.

GetNewMessages (OnTimer1)

Program GetNewMessages;

Procedure OnTimer1;
begin
 ADo('GetNewHeadersInSubscribedGroups');
end;

Begin
End.

GetNewEmails (OnTimer2)

Program GetNewEmails;

Procedure OnTimer2;
begin
 ADo('GetNewEmailsForAllIdentities');
end;

Begin
End.

 

CollapseAll (OnGroupEntered)

This script makes sure that all threads are collapsed when one enters a group.

Program CollapseAll;

Procedure OnGroupEntered(Groupname: string);
begin
 ADo('CollapseAllThreads');
 ADo('RefreshView');
end;

Begin
End.

 

Automatic note by crosspost and follow-up (OnBeforeSend)

I use a script that puts an automatic note in messages that are crossposted or have Follow-Up set, and the nice thing is that it can choose different language versions depending on the group name pattern.

The original by Korbinian Abenthum is no longer available.