I can add Action and Group to custom folder for plugin using AddAction and AddGroup.
Is it possible to automatically add Event (that will be generated with the same plugin) for this action?
It will be interested to see come code example.
Add event at plugin installation
Re: Add event at plugin installation
Not possible without a change to the core.
Brett
Brett
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Add event at plugin installation
It would be nice if you wrote a bit more detail what you need.
Maybe it's not as impossible as Brett writes.
Please use short and simple sentences.
Good is also use an example.
Pako
Maybe it's not as impossible as Brett writes.
Please use short and simple sentences.
Good is also use an example.
Pako
Re: Add event at plugin installation
Adding and removing plugin should be limited to configuration.
Re: Add event at plugin installation
OK. I made plugin for SoundGraph iMON device. Device has both "Event" and "Action" functionality.Pako wrote:It would be nice if you wrote a bit more detail what you need.
For example, the iMON remote control has button for toggle between "mouse" and "keyboard" mode of remote control joystick. When button pressed the plugin receive code X and generate Event. Also to really switch hardware plugin must send code Y to hardware.
I can simple send code Y for code X but more powerful to generate event for code X and then map action with code Y for this event. In this case all process are clear and configurable for users.
User can map Event to Action manually after plugin installed.
But can plugin mapped this event automatically?
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Add event at plugin installation
If I understand well, so I have good news for you!
See (for example) plugin USB-UIRT and look in there eg.Bind (and eg.Unbind).
It's what you need?
Pako
See (for example) plugin USB-UIRT and look in there eg.Bind (and eg.Unbind).
It's what you need?
Pako
Re: Add event at plugin installation
Pako,
Very nice idea. That should work.
@Johnson - Pako's suggestion should enable what you are looking for, but not the way you (and I) had in mind originally. Bind/Unbind work behind the scenes, so no actions/events are added to the tree (to do this would require a change to the core) and I don't think they show up in the log. However, they would allow you to do what you are looking for within your plugin. So I think it is a great suggestion.
Brett
Very nice idea. That should work.
@Johnson - Pako's suggestion should enable what you are looking for, but not the way you (and I) had in mind originally. Bind/Unbind work behind the scenes, so no actions/events are added to the tree (to do this would require a change to the core) and I don't think they show up in the log. However, they would allow you to do what you are looking for within your plugin. So I think it is a great suggestion.
Brett