Hello all,
//Solved!
I added a try parameter and it works.
i have made a little script to retrieve information from a site..
this little script wil be put in my main big script for ANPR support.
here is the example
I see that "note-msg" does not exist on a match.. how can i fix it ?
If it does not have a match it shows up (no results found)
But if i have a match i get that error.
How can i change it like if it has a match it returns with hs.writelog Match found?
I hope some1 can help me , this is the last bit of my huge ANPR script, then its complete after many many hours of work.
regards.
//Solved!
I added a try parameter and it works.
i have made a little script to retrieve information from a site..
this little script wil be put in my main big script for ANPR support.
here is the example
Code:
Sub Main(ByVal Parms As Object) Dim strSite = "http://thisisatest.com" Dim teken As String = hs.devicestring (2947) Dim strDocument = "/test/catalogsearch/result/?q=" &teken Dim strBody Dim x strBody = hs.GetUrl(strSite,strDocument,false,80) x = Instr(1,strBody,"note-msg",1) strBody = Mid(strBody,x) x = Instr(1,strBody, ">",1) + 4 strBody = Mid(strBody,x) x = Instr(1,strBody, "</",1) - 1 strBody = Mid(strBody,1,x) hs.writelog("debug", "Read: " & strBody) end sub
I see that "note-msg" does not exist on a match.. how can i fix it ?
If it does not have a match it shows up (no results found)
But if i have a match i get that error.
Code:
Running script C:\Program Files (x86)\HomeSeer HS3\scripts\test.vb :Exception has been thrown by the target of an invocation.Argument 'Start' must be greater than zero.
I hope some1 can help me , this is the last bit of my huge ANPR script, then its complete after many many hours of work.
regards.