Update remoteManager.py

This commit is contained in:
chrys 2019-02-12 16:06:08 +01:00 committed by GitHub
parent 3232c3672f
commit 1de114748b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,6 +36,7 @@ class remoteManager():
self.commandConst = 'COMMAND ' self.commandConst = 'COMMAND '
self.sayConst = 'SAY ' self.sayConst = 'SAY '
self.interruptConst = 'INTERRUPT' self.interruptConst = 'INTERRUPT'
self.quitAppConst = 'QUITAPPLICATION'
self.defineWindowConst = 'WINDOW ' self.defineWindowConst = 'WINDOW '
self.resetWindowConst = 'RESETWINDOW' self.resetWindowConst = 'RESETWINDOW'
self.setClipboardConst = 'CLIPBOARD ' self.setClipboardConst = 'CLIPBOARD '
@ -80,6 +81,9 @@ class remoteManager():
# interrupt # interrupt
if upperCommandText.startswith(self.interruptConst): if upperCommandText.startswith(self.interruptConst):
self.interruptSpeech() self.interruptSpeech()
# quit fenrir
if upperCommandText.startswith(self.quitAppConst):
self.quitFenrir()
# define window # define window
if upperCommandText.startswith(self.defineWindowConst): if upperCommandText.startswith(self.defineWindowConst):
parameterText = commandText[len(self.defineWindowConst):] parameterText = commandText[len(self.defineWindowConst):]
@ -93,6 +97,8 @@ class remoteManager():
self.setClipboard(parameterText) self.setClipboard(parameterText)
def setClipboard(self, text = ''): def setClipboard(self, text = ''):
self.env['runtime']['memoryManager'].addValueToFirstIndex('clipboardHistory', text) self.env['runtime']['memoryManager'].addValueToFirstIndex('clipboardHistory', text)
def quitFenrir(self):
self.env['runtime']['eventManager'].stopMainEventLoop()
def defineWindow(self, windowText): def defineWindow(self, windowText):
start = {} start = {}
end = {} end = {}