Thanks: 0
Ergebnis 1 bis 1 von 1
Thema: BlockButton
-
27.08.2018, 16:46 #1
- Registriert seit
- 27.08.2016
- Beiträge
- 35
- Thanks (gegeben)
- 0
- Thanks (bekommen)
- 0
- Total Downloaded
- 109,9 KB
- Total Downloaded
- 109,9 KB
Box 1:VU+ Solo2Help me write BlockButton plugin
Hello
Excusme , I need help
I write plugin
How to write a string in a plugin to simulate a button click on the receiver's remote control?
I write function def one(self) , but:
I run plugin
On receiver's remote control I physicaly a button click on button Channel Up
But function def one(self) do not simulate a button click on button Channel Up on the receiver's remote control
My code
from enigma import getDesktop, eTimer
from Components.ActionMap import ActionMap
from Screens.Screen import Screen
from Tools import Notifications
from Screens.MessageBox import MessageBox
from Plugins.Plugin import PluginDescriptor
screenWidth = getDesktop(0).size().width()
skin_hd = """
<screen position="40,40" size="72,72" zPosition="-6" flags="wfNoBorder">
<ePixmap position="0,0" size="72,72" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/BlockButton2/block_hd.png" />
</screen>"""
skin_fhd = """
<screen position="60,60" size="108,108" zPosition="-6" flags="wfNoBorder">
<ePixmap position="0,0" size="108,108" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/BlockButton2/block_fhd.png" />
</screen>"""
class BlockButton2(Screen):
def __init__(self, session):
Screen.__init__(self, session)
if screenWidth and screenWidth == 1280:
self.skin = skin_hd
if screenWidth and screenWidth == 1920:
self.skin = skin_fhd
self["actions"] = ActionMap(["GlobalActions"],
{
"channelup": self.one
}, -2)
self.hide_time = eTimer()
self.hide_time.callback.append(self.setHide)
self.hide_time.startLongTimer(2) # Pause in seconds
def setHide(self):
self.hide_time.stop()
self.close()
def one(self):
from GlobalActions import globalActionMap
global globalActionMap
globalActionMap.action(["GlobalActions"],"channelup")
def sessionstart(reason, **kwargs):
if reason == 0:
print 'BlockButton2'
return
def main(session, **kwargs):
session.open(BlockButton2)
def Plugins(**kwargs):
list = [PluginDescriptor(where=[PluginDescriptor.WHERE_SESSIONSTART], fnc=sessionstart)]
list.append(PluginDescriptor(name=_('BlockButton2' ), description=_("Do Not Show the 'BlockButton2' on the screen"), where=PluginDescriptor.WHERE_PLUGINMENU, icon='plugin.png', fnc=main))
return list
2018-08-27_18-53-40.rarGeändert von SharkyEXE (28.08.2018 um 15:16 Uhr)
-
Advertising
Lesezeichen