def SendFfdshowMessage(self, wParam, lParam=0): try: hwnd = FindWindow(FFDSHOW_REMOTE_CLASS, None) except: raise self.Exceptions.ProgramNotRunning return SendMessage(hwnd, self.mesg, wParam, lParam)
def __call__(self): #-- v2.0 try: hWnd = FindWindow("Winamp v1.x") except: raise self.Exceptions.ProgramNotRunning strWinAmpTitle = GetWindowText(hWnd) sx = strWinAmpTitle.split("*** ") try: strWinAmpTitle = sx[1] + sx[0] except: pass strWinAmpTitle = strWinAmpTitle.replace("*","").strip() strWinAmpTitle = strWinAmpTitle.replace(" - Winamp", "") strWinAmpTitle = strWinAmpTitle.replace(" [Stopped]", "") strWinAmpTitle = strWinAmpTitle.replace(" [Paused]", "") strWinAmpTitle = strWinAmpTitle.replace(" [Stopp]", "") strWinAmpTitle = strWinAmpTitle.replace(" [Pause]", "") decPos = strWinAmpTitle.find(" ") - 1 if decPos > 0 and strWinAmpTitle[decPos] == "." and strWinAmpTitle[:decPos].isdigit(): strWinAmpTitle = strWinAmpTitle[decPos + 2:] strWinAmpTitle = strWinAmpTitle.strip() return strWinAmpTitle
def __call__(self, action, value): #0: set to, 1: next, 2: previous 3: get value try: hwnd = FindWindow(FFDSHOW_REMOTE_CLASS, None) except: raise self.Exceptions.ProgramNotRunning if action == 3: return SendMessage(hwnd, self.plugin.mesg, WPRM_GETPARAM2, self.value) if action == 1 or action == 2: value = SendMessage(hwnd, self.plugin.mesg, WPRM_GETPARAM2, self.value) if self.options.has_key(value): entry = self.options[value] if action == 1: value = entry[3] else: value = entry[4] else: if action == 1: value += 1 else: value -= 1 SendMessage(hwnd, self.plugin.mesg, WPRM_SETPARAM_ID, self.value) SendMessage(hwnd, self.plugin.mesg, WPRM_PUTPARAM, value) return value
def __call__(self, action): #0: disable, 1: enable, 2: toggle, 3: getStatus try: hwnd = FindWindow(FFDSHOW_REMOTE_CLASS, None) except: raise self.Exceptions.ProgramNotRunning if action == 0 or action == 1: SendMessage(hwnd, self.plugin.mesg, WPRM_SETPARAM_ID, self.value) SendMessage(hwnd, self.plugin.mesg, WPRM_PUTPARAM, action) return action oldValue = SendMessage(hwnd, self.plugin.mesg, WPRM_GETPARAM2, self.value) if action == 2: if oldValue: newValue = 0 else: newValue = 1 SendMessage(hwnd, self.plugin.mesg, WPRM_SETPARAM_ID, self.value) SendMessage(hwnd, self.plugin.mesg, WPRM_PUTPARAM, newValue) return newValue if action == 3: return oldValue
def __call__(self): try: hwnd = FindWindow(FFDSHOW_REMOTE_CLASS, None) except: raise self.Exceptions.ProgramNotRunning return SendMessage(hwnd, self.plugin.mesg, WPRM_GETPARAM2, self.value)
def __call__(self, value=0): try: hwnd = FindWindow(FFDSHOW_REMOTE_CLASS, None) except: raise self.Exceptions.ProgramNotRunning SendMessage(hwnd, self.plugin.mesg, WPRM_SETPARAM_ID, self.value) SendMessage(hwnd, self.plugin.mesg, WPRM_PUTPARAM, value)
def __call__(self): self.SendCommand(WM_COMMAND, 40194) try: # Skinned JTFE doesn't auto-focus itself, so let's do that manually hwnd = FindWindow("BaseWindow_RootWnd", "Jump to file") BringHwndToFront(hwnd) except WindowsError: pass # Window not found; user is probably using unskinned JTFE
def __call__(self): """ Find WMPlayer's message window and send it a message with SendMessageTimeout. """ try: hWMP = FindWindow('WMPlayerApp', None) return SendMessageTimeout(hWMP, WM_COMMAND, self.value, 0) except: raise self.Exceptions.ProgramNotRunning
def __call__(self): try: hwnd = FindWindow(FFDSHOW_REMOTE_CLASS, None) except: raise self.Exceptions.ProgramNotRunning cds = COPYDATASTRUCT() cds.dwData = COPY_GET_PRESETLIST SendMessage(hwnd, WM_COPYDATA, eg.messageReceiver.hwnd, addressof(cds)) return cds
def SendCommand(self, idMessage, wParam, lParam=0): """ Find Winamp's message window and send it a message with SendMessageTimeout. """ try: hWinamp = FindWindow('Winamp v1.x') return SendMessageTimeout(hWinamp, idMessage, wParam, lParam) except: raise self.Exceptions.ProgramNotRunning
def __call__(self, preset): try: hwnd = FindWindow(FFDSHOW_REMOTE_CLASS, None) except: raise self.Exceptions.ProgramNotRunning cds = COPYDATASTRUCT() cds.dwData = COPY_SETACTIVEPRESET cds.lpData = cast(c_wchar_p(preset), PVOID) cds.cbData = (len(preset) + 1)*2 return SendMessage(hwnd, WM_COPYDATA, eg.messageReceiver.hwnd, addressof(cds))
def __call__(self): """ Find SageTV's message window and send it a message with SendMessageTimeout. """ try: hwnd = FindWindow(self.plugin.targetClass, "SageWin") # WM_USER + 234 = 1258 return SendMessageTimeout(hwnd, 1258, self.value, self.value) except: raise self.Exceptions.ProgramNotRunning
def SendCommand(self, idMessage, wParam, lParam=0): """ Find Winamp's message window and send it a message with SendMessageTimeout. """ global sendWAActive while sendWAActive: sleep(0.1) sendWAActive =True try: hWinamp = FindWindow('Winamp v1.x') data = SendMessageTimeout(hWinamp, idMessage, wParam, lParam) sendWAActive =False return data except: sendWAActive =False raise self.Exceptions.ProgramNotRunning
def __call__(self, action, value): #0: set to, 1: change by, 2: get value try: hwnd = FindWindow(FFDSHOW_REMOTE_CLASS, None) except: raise self.Exceptions.ProgramNotRunning if action == 2: return SendMessage(hwnd, self.plugin.mesg, WPRM_GETPARAM2, self.value) if action == 1: value += SendMessage(hwnd, self.plugin.mesg, WPRM_GETPARAM2, self.value) value = max(self.options[0], value) value = min(self.options[1], value) SendMessage(hwnd, self.plugin.mesg, WPRM_SETPARAM_ID, self.value) SendMessage(hwnd, self.plugin.mesg, WPRM_PUTPARAM, value) return value
def __call__(self): try: hWnd = FindWindow("BSPlayer") return SendMessageTimeout(hWnd, WM_BSP_CMD, self.value, 0) except: raise self.Exceptions.ProgramNotRunning
def __call__(self): try: hWnd = FindWindow("GomPlayer1.x") return SendMessageTimeout(hWnd, WM_COMMAND, self.value, 0) except: raise self.Exceptions.ProgramNotRunning
def __call__(self): try: hWnd = FindWindow("TVcCore-RemoteMSG-Class") return SendMessageTimeout(hWnd, WM_COMMAND, self.value, 0) except: raise self.Exceptions.ProgramNotRunning
def __call__(self): try: hWnd = FindWindow("TDVBMainForm", "MyTheatre") return SendMessageTimeout(hWnd, 3025, self.value, 0) except: raise self.Exceptions.ProgramNotRunning