View Single Post
Old 12-31-2021, 01:45 PM   #61
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,804
Karma: 6000000
Join Date: Nov 2009
Device: many
Master now supports a new Automate List Tool (and the AutomateEditor Dialog also supports it as well).

Code:
SetPluginParameter YOUR_PARAMETER_HERE
where YOUR_PARAMETER_HERE is passed as a string to the plugin.

The plugin interface has also been extended to add two related interface calls:

Code:
    # Newly Added to Support Plugins running in Automate Lists

    # returns boolean True if plugin was launched by the automate False otherwise
    def using_automate(self):
        return self._w.using_automate

     # returns a string of the automate plugin parameter set before plugin launch
     # and the null string "" if nothing was passed
    def automate_parameter(self):
        return self._w.automate_parameter
These new calls are supported by launcher_versions of 20220101 or greater.

Comments welcome.

Quote:
Originally Posted by KevinH View Post
Yes that was what I as proposing. FWIW, PluginRunner gets many of its cfg values from the MainWindow that it is launched from (ie its BookBrowser, etc) so a MainWindow member variable is what the Automate Tool would need to be able to set. It would be easy to create a new AutomateList Tool command "SetPluginParameter" that accepts a single parameter whose value is used to set the MainWindow's member variable value so that PluginRunner can pick it up (empty when not set).
KevinH is online now   Reply With Quote