Writing a clipboard to file?
Using K95 2.1.3.
I was wondering if it was possible to write the clipboard contents (copying
info), directly into a file.
Basically what I'm trying to do, is copy info from certain files which K95
can't directly read properly, then have it write to a .txt file and
immidately process that.
*The info being copied is just raw text.
- Scott
Re: Writing a clipboard to file?
On 2006-08-25, SCOTT CAISSIE <scottac@nb.sympatico.ca> wrote:
: Using K95 2.1.3.
: I was wondering if it was possible to write the clipboard contents (copying
: info), directly into a file.
:
K95 doesn't have a \v(clipboard) variable that you can refer to
programmatically, but there is a keyboard verb, \Kpaste, that pastes from
the clipoard. By default, this is assigned to Shift-Insert:
. If K95 is in its terminal screen, then \Kpaste sends the clipboard
contents to the host (if the clipboard contains text).
. If K95 is in its command screen, \Kpaste inserts the text from the
clipboard where the cursor is.
Of course, if you have Notepad or other text editor open, you can also paste
into it. But these are all manual operations. Offhand, I can't think of a
way to write the clipboard contents directly into a file. Perhaps in the
next release we can consider adding a \v(clipboard) variable.
: Basically what I'm trying to do, is copy info from certain files which K95
: can't directly read properly, then have it write to a .txt file and
: immidately process that.
: *The info being copied is just raw text.
:
Maybe there is a way do this after all. The file interface
(FOPEN/FREAD/FWRITE/FCLOSE) has a lot of options. If can describe the
problem in more detail maybe I can suggest a way around it.
- Frank
Re: Writing a clipboard to file?
Frank da Cruz wrote:[color=blue]
> On 2006-08-25, SCOTT CAISSIE <scottac@nb.sympatico.ca> wrote:
> : Using K95 2.1.3.
> : I was wondering if it was possible to write the clipboard contents (copying
> : info), directly into a file.
> :
> K95 doesn't have a \v(clipboard) variable that you can refer to
> programmatically, but there is a keyboard verb, \Kpaste, that pastes from
> the clipoard. By default, this is assigned to Shift-Insert:[/color]
The variable you are looking for is \v(select). Text selected with
the mouse in K95 is stored in the \v(select) variable. This is
independent of the Windows clipboard and can be used for writing macros
that manipulate the selection contents.
Jeffrey Altman