nanothief Posted January 20, 2008 Share Posted January 20, 2008 The definition of AU3_PixelSearch is:AU3_API void WINAPI AU3_PixelSearch(long nLeft, long nTop, long nRight, long nBottom, long nCol, /*default 0*/long nVar, /*default 1*/long nStep, LPPOINT pPointResult);I tried using it like this:CODE#include <windows.h>#include <AutoIt3.h>#include <stdio.h>int main() { LPPOINT point; AU3_PixelSearch(10,10,1000,1000, 0xFF0000, 0, 1, point); printf("%d", point->x); return 0;}I then compiled it with:gcc test.c -lAutoItX3However this causes a segmentation fault. Removing the printf line results in the same error. Also, whether the color is inside the region or not makes no difference.What is the correct way of using AU3_PixelSearch? (an example would be nice )I'm using version 3.2.10 Link to comment Share on other sites More sharing options...
razer_anthom Posted January 22, 2008 Share Posted January 22, 2008 (edited) It is a C question, dont declare e POINTER to POINT (LPPOINT), but a POINT then pass the reference as parameter... Try: #include <windows.h> #include <AutoIt3.h> #include <stdio.h> int main() { POINT point; // <===== HERE AU3_PixelSearch(10,10,1000,1000, 0xFF0000, 0, 1, &point); // <===== AND HERE printf("%d", point->x); return 0; } Edited January 22, 2008 by razer_anthom Link to comment Share on other sites More sharing options...
Squirrely1 Posted January 30, 2008 Share Posted January 30, 2008 (edited) Yeah, now you guys are talkin': the man is not the message, and the message is not the man - don't declare the pointer as the point. Instead the point is always the Point. Edited January 30, 2008 by Squirrely1 Das Häschen benutzt Radar 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