Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Can I read user input in the middle of an acion?

If you have a question or need help, this is the place to be.
Post Reply
easy
Posts: 46
Joined: Wed Dec 05, 2007 10:05 pm

Can I read user input in the middle of an acion?

Post by easy »

Hi,

It seems I'll be forced to switch to VLC because of some reasons, and I am trying to modify VLC plugin a little. What I want to make is a seek command, that would give me the possibility to set seek time using remote control. It seems everthing clear to me in the existing plugin, but please tell the noobie, how could I get value from keyboard(or remote)?
I'd like to make this action:
class Seek(eg.ActionClass):
description = ("Seek some time")

def __call__(self, xx):
self.plugin.push("seek" + xx + "\r\n")
The problem - value of "xx" needs to be read from remote or keyboard(number keys on UltraX work using keyboard driver). Is there any way to get some user input in the middle of an action? Or the only workaround would be to make 10 actions for numbers 0-9, then assign button to each and put values to eg.globals.MySeekVar?
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Can I read user input in the middle of an acion?

Post by Bitmonster »

You can't get user input while an action is processing. (You could popup a dialog with a text control to get some input, but this is most likely not what you want). So you have to compose your number yourself.

You can then use the "MyCommand" action of the VLC plugin with a string substition like "seek {MySeekVar}" as parameter or directly call eg.plugins.VLC.MyCommand("seek " + MySeekVar) inside a PythonScript without modification of the plugin.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
Post Reply