Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Possible to send mouseclick left with autoassembler option?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
shakib187
Expert Cheater
Reputation: 0

Joined: 24 May 2007
Posts: 215

PostPosted: Mon Apr 22, 2013 1:43 am    Post subject: Possible to send mouseclick left with autoassembler option? Reply with quote

just curious if I can do it lol
Back to top
View user's profile Send private message
eax.qbyte
Advanced Cheater
Reputation: 3

Joined: 25 Jun 2011
Posts: 59
Location: CEDisasmView

PostPosted: Mon Apr 22, 2013 9:59 am    Post subject: Yes it is. This post has 1 review(s) Reply with quote

this is the most simple api for this purpose:
Code:
VOID WINAPI mouse_event(
  _In_  DWORD dwFlags,
  _In_  DWORD dx,
  _In_  DWORD dy,
  _In_  DWORD dwData,
  _In_  ULONG_PTR dwExtraInfo
);


And this is a sample of using it in AA script
Once you enable this code and go in to game window
it will set cursor at specified position, with holding the left mouse button down.
Code:

alloc(newmem,2048)
CREATETHREAD(newmem)


// Definitions
define(MOUSEEVENTF_ABSOLUTE,8000)
define(MOUSEEVENTF_LEFTDOWN,0002)
define(MOUSEEVENTF_LEFTUP,0004)
define(MOUSEEVENTF_MOVE,0001)

// Variables
label(dwFlags)
label(dxc)
label(dyc)
label(dwData)
label(dwExtraInfo)

newmem:
// Preparing variables
mov eax,MOUSEEVENTF_ABSOLUTE
or eax,MOUSEEVENTF_LEFTDOWN
or eax,MOUSEEVENTF_MOVE
mov dword ptr [dwFlags],eax
mov dword ptr [dyc],00003000       // cursor pos y
mov dword ptr [dxc],00002000       // cursor pos x
mov dword ptr [dwData],00000000
call GetMessageExtraInfo
mov dword ptr [dwExtraInfo],ecx

// pushing them into stack for function use
push dword ptr [dwExtraInfo]
push dword ptr [dwData]
push dword ptr [dyc]
push dword ptr [dxc]
push dword ptr [dwFlags]
call mouse_event                   // Call the API

//wait 4 sec for next loop
push 1000
call sleep
jmp newmem
ret


dwFlags:
dd 00000000
dxc:
dd 00000000
dyc:
dd 00000000
dwData:
dd 00000000
dwExtraInfo:
dd 00000000



There also should be a other ways too like sending messages to window or call sendinput function which is more complicated that i dont know about it si much.
I hope it helps.

_________________
My special thanx to Cheat Engine and its developers. It helps me do the hard and boring but valuable process of understanding the code, easily and with fun.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
shakib187
Expert Cheater
Reputation: 0

Joined: 24 May 2007
Posts: 215

PostPosted: Tue Apr 23, 2013 3:20 am    Post subject: Reply with quote

thank you
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites