ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > FARR Plugins and Aliases

Fingers in the nose guide to build javascript plugins. Does that mean its easy ?

<< < (6/8) > >>

ewemoa:
Hmm...no other responses...May be it's not a good idea to keep posting further questions in this thread.

Well, I will give it another try anyway.

I'm trying to use onProcessTrigger() to handle launching of things via a plugin, but for some items it didn't create [1] -- is it correct that this is currently a futile endeavor?  The following FScript source snippet gives me the sense that that might be the case:


--- ---PREFUNCDEF BOOL EFuncName_Allow_ProcessTrigger(const char* destbuf_path, const char* destbuf_caption, const char* destbuf_groupname, int pluginid,int thispluginid, int score, E_EntryTypeT entrytype, void* tagvoidp, BOOL *closeafterp)
{
    // does this plugin want to take over launching of this result?
    if (thispluginid!=pluginid)
    {
        // if we didnt create it, let default handler do it
        return FALSE;
    }

I don't think I have an environment to make this change myself -- any chances of takers or perhaps producing a version of FScript that will compile under Code::Blocks? :)


[1] I'm investigating the idea of implementing FARR-specific file associations.

mouser:
im not sure i understand your question about onprocesstrigger..
it's fine for a plugin (that has a reason to) to handle the launching of items it didn't create.

ewemoa:
Well, I thought so too, but AFAICT, onProcessTrigger() doesn't appear to get called for a test plugin of mine -- I placed statements to produce debugging output (as well as invoke the debugger) in onProcessTrigger(), but neither seemed to have any effect.  So I started wondering if it was being called at all...I looked at the GooglePlus plugin as it seems to make use of onProcessTrigger(), but I didn't manage to figure out whether it's doing something that my plugin isn't.

I looked in the FScript source and found something [1] that looked to me like FScript decides that if your plugin hasn't created an item, it doesn't get to handle it -- the quoted code in my previous post was what I came across.  I don't know if I'm interpreting what I'm seeing correctly though :)


[1] The code is from FScript's JrPlugin_MyPlugin.cpp

ecaradec:
Yes, you are right, I made some choices when I wrote the FScript plugin. It does not handle all possibilities of the farr plugin api. At the time I didn't see a lot of use for plugins to handle outputs of others plugins.
What were the uses you think about this fonctionnality mouser ?
Writing this I think it could be possible to use this with modal plugins. Ex a zip plugins could work that way :
* type : zip -> switch the plugin in a kind of select file mode and clear the input
* select a file : any file selected after this with enter would be added to the queue. (use of the onProcessTrigger )
* type : to filename -> zip all the files in the queue into the filename given

mouser:
What were the uses you think about this fonctionnality mouser ?
--- End quote ---

some plugins would be creating entries that aren't real files, and so they would hande their own launches to decide what to do when user clicks.

But as for handling a result that the plugin did not itself create, it would be useful for a plugin that worked like a modifier and didn't create results of its own.

For example, imagine a plugin that was designed to run a program under a different users permissions (like admin), so you type your search and then type +runas:admin

then when you hit enter to launch a program, that plugin would see the +runas: modifier and take over the launching.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version