danzar Posted November 13, 2007 Share Posted November 13, 2007 Hi i was woundering if somone can give me hint how to get the X, and Y varables from >pixelsearch() into a C# varable? example XY[] = Pixelsearch(0,0,100,100,0x123456,2,2); MoveMouse(XY[0],XY[1],1); How do i make that work in C# Link to comment Share on other sites More sharing options...
BobK Posted November 15, 2007 Share Posted November 15, 2007 There's probably an easier way to do it, but this works: CODE private void button1_Click(object sender, EventArgs e) { AutoItX3 au3 = new AutoItX3(); Int32[] pt = new Int32[2]; int color; try { color = Convert.ToInt32(textBox1.Text); Array.Copy((System.Object[])(au3.PixelSearch(0, 0, 100, 100, color, 2, 2)), pt, 2); MessageBox.Show(pt[0].ToString() + " " + pt[1].ToString()); } catch { MessageBox.Show("Color not found"); } } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now