Hi, good friends. I wanted to do more after the super help (thanks to Kevin) I received with this. So here I ran a test to see if I could get the play head to 80% of the video playing. Viola, it worked like a charm.
I ultimately would like to use a percentage like 20 to move the play head in 20% increments. To do so I need to increment the amount. Off course bringing it back to 20 again once at 80. I do not know how I would get the value to store. I know how to do something like that in a text file. However, I am asking if there is a simpler, more efficient way to do this. I would imagine some type of a loop. Thanks for any help!
I ultimately would like to use a percentage like 20 to move the play head in 20% increments. To do so I need to increment the amount. Off course bringing it back to 20 again once at 80. I do not know how I would get the value to store. I know how to do something like that in a text file. However, I am asking if there is a simpler, more efficient way to do this. I would imagine some type of a loop. Thanks for any help!
str s1 l2
typelib WinHttp {662901FC-6951-4854-9EB2-D9A2570F2B2E} 5.1
WinHttp.WinHttpRequest h._create
h.Open("GET" "http://127.0.0.1:8080/requests/status.xml")
h.setRequestHeader("content-type", "application/xml");
str enc.encrypt(4 ":vlcremote");;password for vlc http server(username:password) if no usename then just :password
h.SetRequestHeader("Authorization", F"Basic {enc}")
h.send()
err
,out _error.description
,ret
if h.Status=200
,IXml x._create
,x.FromString(h.ResponseText)
,str vlcState =x.RootElement.Child("state").Value
,if vlcState !="stopped"
,,str vlcTime=x.RootElement.Child("length").Value
,,str vlcVolume=x.RootElement.Child("volume").Value
,,str filename=x.Path("root/information/category/info[@name='filename']").Value
,,out vlcTime
,,out vlcVolume
,,out filename
,,int i
,,i=val(vlcTime); out i
,,str s02=(i/5) * 4; out s02
,,s1=F"http://127.0.0.1:8080/requests/status.xml?command=seek&val={s02}"
,,WinHttp.WinHttpRequest j._create
,,j.Open("GET" s1)
,,j.setRequestHeader("content-type", "application/xml");
,,j.SetRequestHeader("Authorization", F"Basic {enc}")
,,j.send()
,else
,,out x.RootElement.Child("state").Value