set-clipboard
Hello, How to place a string into the MS Windows clipboard? I have found (capi:set-clipboard pane value) However I'm looking for something that doesn't rely on CAPI. Thanks, Francis
Hello, How to place a string into the MS Windows clipboard? I have found (capi:set-clipboard pane value) However I'm looking for something that doesn't rely on CAPI. Thanks, Francis
On Mon, 03 Jul 2006 10:31:25 +0200, Francis Leboutte <f.leboutte@algo.be> wrote: > How to place a string into the MS Windows clipboard? I have found > (capi:set-clipboard pane value) However I'm looking for something > that doesn't rely on CAPI. You will have to fight with the FLI then: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/dataexchange/clipboard/clipboardoperations.asp Why don't you want to use CAPI? SET-CLIPBOARD looks like a nice function. Cheers, Edi.
Le 3/07/2006 10:42, Edi Weitz écrivait : >On Mon, 03 Jul 2006 10:31:25 +0200, Francis Leboutte <f.leboutte@algo.be> wrote: > > > How to place a string into the MS Windows clipboard? I have found > > (capi:set-clipboard pane value) However I'm looking for something > > that doesn't rely on CAPI. > >You will have to fight with the FLI then: > > >http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/dataexchange/clipboard/clipboardoperations.asp Thank you even I was afraid for such an advice. I'm looking for 1 minute solution... >Why don't you want to use CAPI? SET-CLIPBOARD looks like a nice >function. I'm using Java SWT only for GUI. BTW, it is strange that a function that "Sets the contents of the system clipboard" depends on CAPI. Francis >Cheers, >Edi.
On Mon, 03 Jul 2006 11:05:52 +0200, Francis Leboutte <f.leboutte@algo.be> wrote: > BTW, it is strange that a function that "Sets the contents of the > system clipboard" depends on CAPI. Have you actually read the article I linked to? The Win32 clipboard operations are part of the Win32 GUI, the clipboard is owned by a window, windows place information on the clipboard, and so on. A program without a GUI that manipulates the clipboard doesn't make sense. It makes perfect sense that this function is part of CAPI. > I'm using Java SWT only for GUI. Why don't you set the clipboard with Java?
Le 3/07/2006 11:57, Edi Weitz écrivait : >On Mon, 03 Jul 2006 11:05:52 +0200, Francis Leboutte <f.leboutte@algo.be> wrote: > > > BTW, it is strange that a function that "Sets the contents of the > > system clipboard" depends on CAPI. > >Have you actually read the article I linked to? The Win32 clipboard >operations are part of the Win32 GUI, the clipboard is owned by a >window, windows place information on the clipboard, and so on. A >program without a GUI that manipulates the clipboard doesn't make >sense. It makes perfect sense that this function is part of CAPI. Maybe. On ACL, a similar function just needs a lisp object and a format description as arguments. I vote for this solution. > > I'm using Java SWT only for GUI. > >Why don't you set the clipboard with Java? I could do it but not in 1 minute. Francis
On Mon, 03 Jul 2006 16:49:51 +0200, Francis Leboutte <f.leboutte@algo.be> wrote: > On ACL, a similar function just needs a lisp object and a format > description as arguments. I vote for this solution. IIUC, in AllegroCL, the clipboard functions are part of the Common Graphics package and need a displayed window the Lisp image knows about as well, it's just that you don't have to mention the window explicitely. Try to set the contents of the Windows clipboard from an AllegroCL console image without Common Graphics. I'd be surprised if Franz knew ways to outsmart the operating system Lispworks doesn't know.
Le 3/07/2006 17:50, Edi Weitz écrivait : >On Mon, 03 Jul 2006 16:49:51 +0200, Francis Leboutte <f.leboutte@algo.be> wrote: > > > On ACL, a similar function just needs a lisp object and a format > > description as arguments. I vote for this solution. > >IIUC, in AllegroCL, the clipboard functions are part of the Common >Graphics package and need a displayed window the Lisp image knows >about as well, it's just that you don't have to mention the window >explicitely. Try to set the contents of the Windows clipboard from an >AllegroCL console image without Common Graphics. I'd be surprised if >Franz knew ways to outsmart the operating system Lispworks doesn't >know. You must be right (but will not check it :-) BTW here is the SWT version (needs the import of 2 SWT classes): (defun copy-to-clipboard (string) (let ((clipboard (clipboard.new *display*)) (textTransfer (texttransfer.getinstance))) (clipboard.setcontents clipboard (make-j-vector (list string)) (make-j-vector (list textTransfer) :type texttransfer.)) (clipboard.dispose clipboard))) Thanks for your time, Francis