Jump to content

System.AccessViolationException with AutoItX3.Assembly.dll


ANDRIY666
 Share

Recommended Posts

Hello, I want to use AutoItX3.Assembly.dll. Everything works fine except PixelSearch. I have this code in C#:

AutoItX.PixelSearch(new Rectangle(1107, 257, 1107, 257), 0xC57F44, 1);

And I have System.AccessViolationException when I`m trying to use it. Every other functions like AutoItX.WinGetPos, AutoItX.WinMove, AutoItX.Send works fine. 

Link to comment
Share on other sites

Coordinates from your code indicates that your rectangle has no surface...

Buy it is working with AutoItX3_x64.dll. And when I`m changing the code to 

AutoItX.PixelSearch(new Rectangle(0, 0, 1107, 257), 0xC57F44, 1);

or with any other coordinates I still have same error. When it didn`t find pixel there is no error. But when it found it, I have System.AccessViolationException.

Edited by ANDRIY666
Link to comment
Share on other sites

I found solution. Just used AutoItX3_x64.dll from version 3.3.12.0. So the problem is in new AutoItX3_x64.dll. But PixelSearch seems to be broken. It sometimes found another similar color even when I set shade=0. So I need to recheck it with PixelGetColor (it works fine). Also tried newest verison and there is same problem with PixelSearch.

Edited by ANDRIY666
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...