Thanks
i did actually get stuff into J, by turning crlf's into literal \n's and using
the command line GUI, but i am still trying to get stuff out, ie i need to get
J to set the clipboard. Possibly using file foreign's out of J, and then using
powershell to write that temporary file to the clipboard.
If i used a temporary file for reading too, i might be able to eschew the
crlf/\n subterfuge
Might work until 11!: is resurrected for Desktops
~greg
http://krsnadas.org
--
from: David Mitchell <[email protected]>
to: [email protected]
date: Jun 29, 2020, 11:11 AM
subject: Re: [Jprogramming] copy/paste implementation
The CLIP command can use files as input so you may be able to use that for the
clip part:
>clip /?
CLIP
Description:
Redirects output of command line tools to the Windows clipboard. This text
output can then be pasted into other programs.
Parameter List:
/? Displays this help message.
Examples:
DIR | CLIP Places a copy of the current directory listing into the
Windows clipboard.
CLIP < README.TXT Places a copy of the text from readme.txt on to the Windows
clipboard.
The powershell commands are probably more flexible:
get-help Get-Clipboard
NAME
Get-Clipboard
SYNOPSIS
Gets the current Windows clipboard entry.
SYNTAX
Get-Clipboard [-Format {Text | FileDropList | Image | Audio}] [-Raw] [-TextFormatType
{Text | UnicodeText | Rtf | Html | CommaSeparatedValue}] [<CommonParameters>]
DESCRIPTION
The `Get-Clipboard` cmdlet gets the current Windows clipboard entry.
RELATED LINKS
Online Version:
https://docs.microsoft.com/powershell/module/microsoft.powershell.management/get-clipboard?view=powershell-5.1&WT.mc_id=ps-gethelp
Set-Clipboard
REMARKS
To see the examples, type:
"get-help Get-Clipboard -examples".
For more information, type:
"get-help Get-Clipboard -detailed".
For technical information, type:
"get-help Get-Clipboard -full".
For online help, type:
"get-help Get-Clipboard -online"
===
get-help Set-Clipboard
NAME
Set-Clipboard
SYNOPSIS
Sets the current Windows clipboard entry.
SYNTAX
Set-Clipboard [-Append] [-AsHtml] -LiteralPath <String[]> [-Confirm] [-WhatIf]
[<CommonParameters>]
Set-Clipboard [-Append] [-AsHtml] -Path <String[]> [-Confirm] [-WhatIf]
[<CommonParameters>]
Set-Clipboard [-Value] <String[]> [-Append] [-AsHtml] [-Confirm] [-WhatIf]
[<CommonParameters>]
DESCRIPTION
The `Set-Clipboard` cmdlet sets the current Windows clipboard entry.
RELATED LINKS
Online Version:
https://docs.microsoft.com/powershell/module/microsoft.powershell.management/set-clipboard?view=powershell-5.1&WT.mc_id=ps-gethelp
Get-Clipboard
REMARKS
To see the examples, type:
"get-help Set-Clipboard -examples".
For more information, type:
"get-help Set-Clipboard -detailed".
For technical information, type:
"get-help Set-Clipboard -full".
For online help, type:
"get-help Set-Clipboard -online"
===
I suspect you can use file input and output for the powershell cmdlets also.
Cheers,
David
--
from: bill lam <[email protected]>
to: Programming forum <[email protected]>
date: Jun 29, 2020, 9:26 AM
subject: Re: [Jprogramming] copy/paste implementation
android has foreign 11!:x and has clipboard support, but that are unlikely to
be implemented in desktops J as 11!:
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm