Guest NoOne Posted February 12, 2006 at 12:57 AM Report Share #13823 Posted February 12, 2006 at 12:57 AM #include <windows.h> int WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmd, int nShow) { HWND knight = FindWindow("Knight OnLine Client", NULL); Sleep(4000); SetCursorPos( 50, 100 ); mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); Sleep(100); SetCursorPos( 150, 150 ); mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); Sleep(100); SetCursorPos( 250, 50 ); mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); Sleep(100); SetCursorPos( 350, 300 ); mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); Sleep(100); SetCursorPos( 550, 200 ); mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0); mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); Sleep(100); return 0; } que se passa aki ? da o seguinte erro: "Conflicting types for 'WinMain'" Link to comment Share on other sites More sharing options...
Bruno Posted February 12, 2006 at 04:22 AM Report Share #13826 Posted February 12, 2006 at 04:22 AM Não q eu perceba esse código... mas tens q retornas um float... e n vejo nenhum return ? Link to comment Share on other sites More sharing options...
theproject Posted February 12, 2006 at 04:35 AM Report Share #13828 Posted February 12, 2006 at 04:35 AM a funcao winmain nao pode retornar um float... mete a funcao a retornar um int e no fim mete um return 0; Link to comment Share on other sites More sharing options...
Guest NoOne Posted February 12, 2006 at 12:19 PM Report Share #13844 Posted February 12, 2006 at 12:19 PM ops ya enganei-me, la tinha int e e tava a dar erro... vou tentar por o return 0; EDIT: continua a dar o mesmo erro Link to comment Share on other sites More sharing options...
Saco Posted February 12, 2006 at 12:51 PM Report Share #13848 Posted February 12, 2006 at 12:51 PM Suponho que já exista uma funçao chamada WinMain que recebe argumentos diferentes desses, logo dá conflicting types Link to comment Share on other sites More sharing options...
Guest NoOne Posted February 12, 2006 at 02:40 PM Report Share #13853 Posted February 12, 2006 at 02:40 PM ja corrigi o erro: int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) 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