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
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
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])
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])