Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:start: vlcinfo
- alias vlcinfo {
- sockopen $+(vlcinfo,$ticks,$rand(a,z)) 192.168.1.30 8080
- }
- on *:sockopen:vlcinfo*: {
- if $sockerr > 0 { echo -at vlc not running | sockclose vlc }
- sockwrite -n $sockname GET /requests/status.xml HTTP/1.1
- sockwrite -n $sockname Host: localhost
- sockwrite -n $sockname Connection: Keep-Alive
- sockwrite -n $sockname $crlf
- }
- on *:sockread:vlcinfo*: {
- if $sockerr > 0 { echo -a error | sockclose vlc }
- sockread %vlcy
- if (<time>* iswm %vlcy) {
- set %vlc.time $duration($nohtml(%vlcy),3)
- }
- if (<length>* iswm %vlcy) {
- set %vlc.length $duration($nohtml(%vlcy),3)
- }
- if (*name='filename'>* iswm %vlcy) {
- if ($regex(%vlcy,<info name='filename'>\s*\K(.+?)(?=\s*<\/info>)) == 1) {
- set %vlcann11 $regml(1)
- %vlcann11 = $gettok(%vlcann11,$+(1-,$calc($numtok(%vlcann11,46) -1)),46)
- set %vlcann69 %vlcann11 $+($chr(40),%vlc.time,$chr(41),|,$chr(40),%vlc.length,$chr(41))
- write -c \\GATEWAY\Users\Debra\Desktop\videoinfo.txt %vlcann69
- $iif(!$window(@VLC),window -evn @VLC,noop)
- echo @VLC Wrote %vlcann69 to videoinfo at $asctime $date
- .timervlcinfo -m 1 5000 vlcinfo
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement