Как из буфера обмена получить определенные данные?
Например, в буфере есть текст:
Как из него получить значения Duration, Width и Height, и записать их ввиде переменных?
Например, в буфере есть текст:
General
Complete name : D:\Users\Temp-AlexS\Downloads\lang\zzz\002_001_Vid.wmv
Format : Windows Media
File size : 651 MiB
Duration : 11mn 11s
Overall bit rate mode : Constant
Overall bit rate : 8 129 Kbps
Maximum Overall bit rate : 8 303 Kbps
Encoded date : UTC 2011-06-25 19:50:53.674
Video
ID : 2
Format : VC-1
Format profile : MP@HL
Codec ID : WMV3
Codec ID/Info : Windows Media Video 9
Codec ID/Hint : WMV3
Description of the codec : Windows Media Video 9 - Professional
Duration : 11mn 11s
Bit rate mode : Constant
Bit rate : 8 000 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 50.000 fps
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.174
Stream size : 641 MiB (98%)
NumberOfFrames : 33570
Audio
ID : 1
Format : WMA
Format profile : Pro
Codec ID : 162
Codec ID/Info : Windows Media Audio
Description of the codec : Windows Media Audio 10 Professional - 256 kbps, 44 kHz, 2 channel 24 bit 2-pass CBR
Duration : 11mn 11s
Bit rate mode : Constant
Bit rate : 256 Kbps
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Bit depth : 24 bits
Stream size : 20.5 MiB (3%)
NumberOfFrames : 1811
Как из него получить значения Duration, Width и Height, и записать их ввиде переменных?
Код:
$Duration = "11mn 11s"
$Width = "1 280 pixels"
$Height = "720 pixels"