ANDRIY666

System.AccessViolationException with AutoItX3.Assembly.dll

6 posts in this topic

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. 

Share this post


Link to post
Share on other sites



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


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Any solution with wrong color? or how to use newest version with AutoItX3.Assembly.dll?

Edited by ANDRIY666

Share this post


Link to post
Share on other sites

For now I'm just using PixelGetColor. It works purfect and very fast. 

Share this post


Link to post
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