Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Use plugins in inline scripts

hello Everybody,


I'm using a plugin (https://github.com/imnotamember/Pynetstation-Plug-In) to send triggers to an EGI EEG device. It works correctly when I drag the plugin in the experiment overview. What I'm trying to do now however is use the plugin in an inline script since I have programmed most of my paradigm using inline scripts. Is there any tutorial on how one should do this?


Thanks in advance!

Comments

  • Hi,

    I am not sure whether you can import a plug-in just like that, and use it right away. @sebastiaan is something like that possible?

    Anyhow, the plugin is based on code that you can find here: https://code.google.com/archive/p/pynetstation/

    On that website you can also find examples how to use the library to interact with the EGI system. I don't think it is terribly complicated, so I would suggest you give a try and if you get stuck, we can try to help you figuring out what went wrong.

    Good luck,

    Eduard

    Buy Me A Coffee

  • Hi @gvh and @eduard ,

    Once a plugin is added to the experiment, you can execute it using the items object, like so:

    items.execute('my_plugin')
    

    A plugin can also register objects in the Python workspace. For example, the pygaze_init plugin registers an eyetracker object that you can subsequently use in inline_script items. But this depends on the implementation of the plugin.

    So yes, you can interact programmatically with plugins. But what is possible and what makes sense all depends on the specifics of the plugin!

    — Sebastiaan

  • Dear @eduard and @sebastiaan ,


    I got it working in the meantime. I'll make a post about it the coming days.


    Thanks for the help!

Sign In or Register to comment.