diff options
Diffstat (limited to 'plugins/Actman/actman.dpr')
-rw-r--r-- | plugins/Actman/actman.dpr | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/Actman/actman.dpr b/plugins/Actman/actman.dpr index 1296ab9f9c..4a5c795bd1 100644 --- a/plugins/Actman/actman.dpr +++ b/plugins/Actman/actman.dpr @@ -126,6 +126,15 @@ begin DestroyServiceFunction(hsel);
end;
+// This function implements autostart action execution after all others plugins loading
+function DoAutostart(wParam:WPARAM;lParam:LPARAM):int;cdecl;
+begin
+ Result:=0;
+ UnhookEvent(onloadhook);
+
+ CallService(MS_ACT_RUNBYNAME,TWPARAM(AutoStartName),0);
+end;
+
function OnModulesLoaded(wParam:WPARAM;lParam:LPARAM):int;cdecl;
var
ptr:pActionLink;
@@ -150,7 +159,7 @@ begin ptr:=ptr^.Next;
end;
- CallService(MS_ACT_RUNBYNAME,TWPARAM(AutoStartName),0);
+ onloadhook:=HookEvent(ME_SYSTEM_MODULESLOADED,@DoAutostart);
end;
function Load():int; cdecl;
|