Пример #1
0
def repeatLastChatMessage(action, *args, **kwargs):
	if not globalVars.lastChatMessage:
		output.speak(_("No new messages since you've launched %s.")%versionInfo.name)
		return
	elif action=="repeatOnly":
		messages.speakChatMessage(globalVars.lastChatMessage, True)
	elif action == "activateChatMonitorAndWindow":
		globalVars.lastChatMessage.Chat.OpenWindow()
		globalVars.chatMonitor = globalVars.lastChatMessage.Chat
Пример #2
0
def repeatLastChatMessage(action, *args, **kwargs):
    if not globalVars.lastChatMessage:
        output.speak(
            _("No new messages since you've launched %s.") % versionInfo.name)
        return
    elif action == "repeatOnly":
        messages.speakChatMessage(globalVars.lastChatMessage, True)
    elif action == "activateChatMonitorAndWindow":
        globalVars.lastChatMessage.Chat.OpenWindow()
        globalVars.chatMonitor = globalVars.lastChatMessage.Chat
Пример #3
0
def handleChatMessage(task, numberOfMessage = 0,*args):
	lastTenCusMessages = None 
	if globalVars.chatMonitor: lastTenCusMessages=globalVars.chatMonitor.Messages
	if not lastTenCusMessages:
		output.speak(_("No new messages since %s loaded or no chat Monitor selected yet.")%versionInfo.name)
		return
	elif numberOfMessage>=len(lastTenCusMessages):
		output.speak(_("no message at this position. The first is at position %d")%(len(lastTenCusMessages)))
		return
	if task=='readMessage':
		try:
			messages.speakChatMessage(lastTenCusMessages[numberOfMessage], True)
		except:
			pass
	elif task=='copyMessage':
		messages.messageToClipboard(lastTenCusMessages[numberOfMessage])
	elif task=='searchForAddresses':
		messages.searchForURL(lastTenCusMessages[numberOfMessage])
Пример #4
0
def handleChatMessage(task, numberOfMessage=0, *args):
    lastTenCusMessages = None
    if globalVars.chatMonitor:
        lastTenCusMessages = globalVars.chatMonitor.Messages
    if not lastTenCusMessages:
        output.speak(
            _("No new messages since %s loaded or no chat Monitor selected yet."
              ) % versionInfo.name)
        return
    elif numberOfMessage >= len(lastTenCusMessages):
        output.speak(
            _("no message at this position. The first is at position %d") %
            (len(lastTenCusMessages)))
        return
    if task == 'readMessage':
        try:
            messages.speakChatMessage(lastTenCusMessages[numberOfMessage],
                                      True)
        except:
            pass
    elif task == 'copyMessage':
        messages.messageToClipboard(lastTenCusMessages[numberOfMessage])
    elif task == 'searchForAddresses':
        messages.searchForURL(lastTenCusMessages[numberOfMessage])