Answer the question
In order to leave comments, you need to log in
Loop code in sysharp?
Please help me loop the code:
instance.UseTrafficMonitoring = true;
var traffic = instance.ActiveTab.GetTraffic();
System.Threading.Thread.Sleep(200); //250-350-450
foreach(var t in traffic) {
if (t.Url.Contains("/search?tbm=map")) {
return System.Text.Encoding.UTF8.GetString(t.ResponseBody);
//return System.Text.Encoding.UTF8.GetString(t.ResponseBody, 0, t.ResponseBody.Length);
}
}
return "0";
Answer the question
In order to leave comments, you need to log in
'looping' is a way to solve a problem, and the question should be about the problem itself, otherwise it's completely unclear what you need.
I'm telepathic - you have browser components on the form and for the first one, in which the address will match the specified condition, you need to return the html body of the page?
ps run the specified code without sleep in the method of the Timer component, setting it to the polling interval
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question