private void button1_Click(object sender, EventArgs e) { try { Form1.Instance.webBrowser1.Document.GetElementById("asirra-challenge"). Document.GetElementById("ScoreButton").InvokeMember("click"); } catch { MessageBox.Show("Unable to click Asirra scoring button"); } this.Visible = false; try { for (int i = 0; i < 15; i++) { System.IO.File.Delete(i + "_Asirra.bmp"); } } catch { } newCat newcatx = new newCat(Form1.Instance.newcaptchas); Form1.Instance.webBrowser1.Invoke(newcatx); this.Close(); }
private void button2_Click(object sender, EventArgs e) { try { Form1.Instance.webBrowser1.Document.GetElementById("asirra-challenge"). Document.GetElementById("NewChallengeButton").InvokeMember("click"); } catch { MessageBox.Show("Unable to click Asirra new challenge button"); } this.Visible = false; newCat newcatx = new newCat(Form1.Instance.newcaptchas); Form1.Instance.webBrowser1.Invoke(newcatx); this.Close(); }