Launch plugins at startup

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
fabiochelly
Power Member
Power Member
Posts: 603
Joined: 2003-02-05, 12:03 UTC
Location: Rambouillet, France

Launch plugins at startup

Post by *fabiochelly »

Is there a way to have one's plugin launched as soon as TC starts?
I mean, just launch the DLL_PROCESS_ATTACH, not view it in the panel.

Because, in my case, I have a timer (with an interval of 60 seconds) in my plugin and I need events to be executed as soon as TC starts, not only when the user enters it.
Fabio Chelly.
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
User avatar
André Martin
Senior Member
Senior Member
Posts: 245
Joined: 2003-02-05, 15:46 UTC
Location: Dresden, Germany

Post by *André Martin »

You mean the DllEntryPoint function with reason=DLL_PROCESS_ATTACH as parameter...
This is not possible because the plugin will be loaded (and DllEntryPoint will be called) only when the user tries to use it... (e.g. open the plugins root \\pluginname\).
But why does your timer need to be activated before the user opens your plugin?
Browse the web with the HTTP SmartBrowserPlugin
Check your mails with the POP3/SMTP EmailPlugin!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, this isn't possible. Why not simply write a separate EXE which you put in the Windows Startup group? It will then run in the background (hidden) and do what you need, even if TC isn't running. Your plugin could then either read the data from a file, or via WM_COPYDATA directly from the running program, e.g. via a hidden window which you can find via FindWindow.
Author of Total Commander
https://www.ghisler.com
User avatar
fabiochelly
Power Member
Power Member
Posts: 603
Joined: 2003-02-05, 12:03 UTC
Location: Rambouillet, France

Post by *fabiochelly »

Yes but It's a little too complicated for a function as simple as a showmessage.
Fabio Chelly.
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes but It's a little too complicated for a function as simple as a showmessage.
Why do you need a ShowMessage running all the time?
Author of Total Commander
https://www.ghisler.com
User avatar
fabiochelly
Power Member
Power Member
Posts: 603
Joined: 2003-02-05, 12:03 UTC
Location: Rambouillet, France

Post by *fabiochelly »

For my calendar plugin, users can create events with date and time. It would be useful to have an alert (a showmessage) right on time (only if TC is active).
Fabio Chelly.
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
Post Reply