ShellAnything
ShellAnything copied to clipboard
Shared properties
<property name="compare.first.selection.path" value="${selection.path}" />
The value of the property should be shared between different applications calling the context menu, for example if I use my own explorer and click on it and compare.first.selection.path produces the value, and I use TotalCMD to call the context menu, compare.first.selection.path doesn't have a value, it's in its initial state, of course, it doesn't have any value. doesn't have a value, it's the initial state, and of course, it's not just with TotalCMD, any application that can call a context menu can't share the property
Sharing properties across multiple applications is not supported at the moment. I also do not plan to support this. The intended way right now is that each application loads their own instance of ShellAnything. All instances are independent from each other.
This feature would require communication between explorer.exe and TotalCMD.exe for synchronizing properties. ShellAnything is single threaded. This decision greatly simplifies the code and potentials problems. Shared properties across multiple applications also risk potential locks. For example, locking explorer.exe (not responsive) while TotalCMD.exe is processing Actions.
Also, some properties should absolutely not be synchronized across multiple applications. For example :
- Environment variables : each application have their own set of environment variables.
- Selection-based properties : each application can display a menu and select different files.
- Fixed properties : many contains values based on the current executable. Also, by design, they should remain constant.
- Live properties also would not need to be synchronized. By their nature, they can change every time they are resolved.
If you absolutely need this feature, you could implement it yourself with a plugin. Documentation is available in the User Manual. I would suggest that you design your plugin to something similar to the example sa_plugin_services. This plugin uses a callback function that is called when the selection changes (ShellAnything is updated and about to be displayed). You could implement your own properties synchronization mechanism between multiple ShellAnything instances at this point.