Windows clipboard

Started by cameyo, October 09, 2023, 06:00:10 AM

Previous topic - Next topic

cameyo

Do you known a way to manage windows clipboard (cut, copy, paste)?
I have tried to use clipboard.dll with no luck.
Thanks.

cameyo

Yael

I use a call to pasteclipboard.exe to read from the clipboard. Here, an example:

(set 'option (exec "pasteclipboard.exe"))
(set 'optid (parse (option 0)))
(when (= (join optid) "0") (myfunction))
.
.
.

To put something on the clipboard I call clip.exe (all of this under Windows OS)

cameyo

#2
Thanks.
I can use the "clip" command, but where is "pasteclipboard.exe" ?
I have found: "powershell get-clipboard" to get text from clipboard.

Yael

I am now attaching a zipped file with the pasteclipboard.exe here:

Yael

As an example, in a Windows *.bat file use this:

echo "%var%" | clip.exe
pasteclipboard.exe
yournewlispfile.exe

The file yournewlispfile.exe is your newlisp compiled file, which must include these commands:

(set 'option (exec "pasteclipboard.exe"))
(set 'myvar(parse (option 0)))

I know it is a dirty way of doing things, but honestly after struggling with dll's import I failed miserably.


cameyo