View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003314 | Far Manager | Plugins API | public | 2016-09-27 14:47 | 2016-09-28 10:49 |
Reporter | pepak | Assigned To | |||
Priority | normal | Severity | feature | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 3.0 | ||||
Summary | 0003314: PluginsControl needs a simple method for calling plugins | ||||
Description | I can't find any easy way for my plugin to call another plugin. As far as I can tell, the only way I can reliably do it involves: 1) Find a plugin with PCTL_FINDPLUGIN. 2) Get its information with PCTL_GETPLUGININFORMATION. 3) If the plugin is loaded... 4) Use its ModuleName with LoadLibrary and GetProcAddress to get address of the OpenW function. 5) Prepare an OpenInfo structure with the necessary data. 6) Call OpenW. I would appreciate a simpler method. While the above is universal, one doesn't usually need all the power of OpenW - a simple call to pass a command-line to a plugin would satisfy most needs. Particularly since that simple interface would let me run a native (non-plugin) command line as well, which is apparently not possible with the current API. | ||||
Tags | No tags attached. | ||||
Build | |||||
|
MCTL_EXECSTRING + Plugin.Command |
|
It was my understanding that this would require a plugin to support macro calls. Am I mistaken? Can Plugin.Command be used to execute a command line in the context of standard (non-plugin) panel, too? |
|
Plugin.Call requires, Plugin.Command and Plugin.Menu don't All should behaves same as user input in command line |
|
Plugin.Command works nicely, even though it only replaces steps 4-6 above. Thanks for the hint. My second question was perhaps poorly formulated. What I meant is, is it possible to execute a command line not through a plugin, but through FAR Manager itself? The distinction being, "edit:<for /?" is a plugin command while "cd c:\windows" is a FAR command (possibly passed to the underlying operating system). Is there a special GUID for FAR itself? I tried all zeroes, but apparently that is not correct. |
|
I wonder why do you ever need steps 1..3 Plugin Id is constant, and you can find if it is loaded by analysing returned values of MCTL_EXECSTRING It's not possible now. But you can emulate user input with macro (MCTL_SENDSTRING). Like this:
|
Date Modified | Username | Field | Change |
---|---|---|---|
2016-09-27 14:47 | pepak | New Issue | |
2016-09-27 17:13 | JohnDoe | Note Added: 0014816 | |
2016-09-27 18:31 | pepak | Note Added: 0014817 | |
2016-09-28 07:13 | JohnDoe | Note Added: 0014818 | |
2016-09-28 07:13 | JohnDoe | Note Edited: 0014818 | |
2016-09-28 08:07 | pepak | Note Added: 0014819 | |
2016-09-28 10:44 | JohnDoe | Note Added: 0014820 | |
2016-09-28 10:46 | JohnDoe | Note Edited: 0014820 | |
2016-09-28 10:49 | JohnDoe | Note Edited: 0014820 |