Rank: Newbie Groups: Member
Joined: 10/8/2017 Posts: 1
|
This is what I have.
Code: C#
private void webView2_LoadCompleted(object sender, EO.WebBrowser.LoadCompletedEventArgs e)
{
if (buynow == true)
{
webView2.EvalScript(string.Format(@"
searchResults = document.getElementById('searchResultsRows').children;
listing = searchResults[1].children; block = listing[1].children;
price = block[1].children; value = price[0].children;
realprice = ((value[0].innerText).trim()).replace('€', '');
if (realprice <= {0}) {
buttons = block[0].children;
buy_button = buttons[0].children;
buy_button[0].click();
document.getElementById('market_buynow_dialog_accept_ssa').click();
document.getElementById('market_buynow_dialog_purchase').click();
alert('Bought!')
}
else{alert('Too Late!');}"
, buywhen_tb.Text));
}
}
This gets some kind of String.Format Error, but what is wrong?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
Thanks for posting in the support forum. This is just to let you know that our support does not troubleshoot such errors because its about formatting a string, which is a generic programming issues that can occur anywhere with or without our product. As a general rule, we do not provide support on generic programming issues to avoid abuse. Hope you understand.
|