Here is a working example posted by Mattike
code:
var WM_DROPFILES = 0x233;
function OnEvent_Initialize() {
// [...] Removed Code
Wnd.RegisterMessageNotification(WM_DROPFILES, true);
}
Obviously, you will need to replace the value of WM_DROPFILES with the hex number relevant to the message you want to hook.
The scripting documents explain how to use the OnWindowidEvent_MessageNotification event