def GetOperation(self): with clipboardHelper.Clipboard() as c: fmt=c.register_format("Preferred DropEffect") buf=c.get_data(fmt) op=struct.unpack('i',buf)[0] #end with return op
def SendToClipboard(self): with clipboardHelper.Clipboard() as c: c.empty() c.set_data(clipboardHelper.ClipboardFormats.drop_handle, bytes(self.byte)) fmt = c.register_format("Preferred DropEffect") c.set_data(fmt, struct.pack('i', self.operation))
def FullpathCopy(self): t = self.GetSelectedItems().GetItemPaths() globalVars.app.say(_("フルパスをコピー"), interrupt=True) t = "\n".join(t) with clipboardHelper.Clipboard() as c: c.set_unicode_text(t)
def NameCopy(self): globalVars.app.say(_("ファイル名をコピー"), interrupt=True) t = self.GetSelectedItems().GetItemNames() t = "\n".join(t) with clipboardHelper.Clipboard() as c: c.set_unicode_text(t)
def ReceiveFromClipboard(self): with clipboardHelper.Clipboard() as c: s=c.get_dropped_files()
def GetFileList(self): with clipboardHelper.Clipboard() as c: lst=c.get_dropped_files() #end return lst
def speak(self, text, **options): with clipboardHelper.Clipboard() as c: c.set_unicode_text(text)