Search
Write a publication
Pull to refresh

Копируем формулу из Windows 7 Math Input Panel в буфер обмена с помощью Powershell 2.0

Reading time1 min
Views729
MathML.ps1
Add-Type -AssemblyName PresentationCore
$dataObject = [Windows.Clipboard]::GetDataObject()
$memoryStream = $dataObject.GetData("MathML")
if ($memoryStream) {
    $streamReader = [System.IO.StreamReader]($memoryStream)
    $mathML = $streamReader.ReadToEnd()
    [Windows.Clipboard]::SetText($mathML)
}

Запуск
powershell.exe -noprofile -sta -command .\MathML.ps1
Tags:
Hubs:
Total votes 8: ↑6 and ↓2+4
Comments0

Articles