2 , PowerShell, - Autohotkey.
Autohotkey
;) , . :
^#n::
Run, Notepad
WinWaitActive Untitled - Notepad2
Send !e
Send p
return
notepad2, Alt + E P. , . - Ctrl + V ( ). . - Autohotkey.
PowerShell
, Notepad2. /c Notepad2 .
, tnp, :
( , PowerShell -sta, )
function tnp {
param(
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
[object]
$InputObject
)
begin { $objs = @() }
process { $objs += $InputObject }
end {
$old = Get-clipboard
$objs | out-string -width 1000 | Set-Clipboard
notepad /c
sleep -mil 500
$old | Set-Clipboard
}
}
function Set-Clipboard {
param(
[Parameter(Mandatory=$true,ValueFromPipeline=$true,Position=0)][object]$s
)
begin { $sb = new-object Text.StringBuilder }
process {
$s | % {
if ($sb.Length -gt 0) { $null = $sb.AppendLine(); }
$null = $sb.Append($_)
}
}
end { Add-Type –a system.windows.forms; [windows.forms.clipboard]::SetText($sb.Tostring()) }
}
function Get-Clipboard {
Add-Type –a system.windows.forms
[windows.forms.clipboard]::GetText()
}
- :
(get-date) | gm | tnp
- - , .