How to tell if Total Commnader is running?
Moderators: Hacker, petermad, Stefan2, white
How to tell if Total Commnader is running?
Is there an official, approved, way to tell if Total Commnader is running?
- Vochomurka
- Power Member
- Posts: 816
- Joined: 2005-09-14, 22:19 UTC
- Location: Russia
- Contact:
If window with class TTOTAL_CMD exists. I don't know whether this is "official" way, but it is really approved.
Single user license #329241
PowerPro scripts for Total Commander
PowerPro scripts for Total Commander
In case you are writing an addon that needs to co-operate / rely on a running TC, you can also try to expand the "%COMMANDER_INI%" environment variable, since Total Commander versions above 7.00 will instantly return your application the exact configuration file path of the current TC instance, in case the app has been started by Total Commander.
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
%COMMANDER_INI% is only available when a program was loaded from within Total Commander, not from Explorer. Therefore better use the method suggested by ts4242.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Yes, thats true - thats why I noticed "in case the app has been started by Total Commander" in my previous post - searching for TTOTAL_CMD class is a more universal way for sure.
For any other special cases, expanding the envvar can be a better solution though (e.g. when an addon _shouldn't_ work without a running Total Commander & it is needed to be run directly from TC).
For any other special cases, expanding the envvar can be a better solution though (e.g. when an addon _shouldn't_ work without a running Total Commander & it is needed to be run directly from TC).