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 


What is Module?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
DURAN
Newbie cheater
Reputation: 14

Joined: 19 Apr 2007
Posts: 16
Location: The Netherlands

PostPosted: Sat Dec 08, 2007 6:57 am    Post subject: What is Module? Reply with quote

they said add this in Module how?
Code:
Public Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Public Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
Public Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
    Public Const MOUSEEVENTF_LEFTDOWN = &H2
    Public Const MOUSEEVENTF_LEFTUP = &H4
    Public Const MOUSEEVENTF_MIDDLEDOWN = &H20
    Public Const MOUSEEVENTF_MIDDLEUP = &H40
    Public Const MOUSEEVENTF_RIGHTDOWN = &H8
    Public Const MOUSEEVENTF_RIGHTUP = &H10
    Public Const MOUSEEVENTF_MOVE = &H1
Public Type POINTAPI
    x As Long
    y As Long
    End Type
Public Function GetX() As Long
    Dim n As POINTAPI
    GetCursorPos n
    GetX = n.x
End Function
Public Function GetY() As Long
    Dim n As POINTAPI
    GetCursorPos n
    GetY = n.y
End Function
Public Sub LeftClick()
    LeftDown
    LeftUp
End Sub
Public Sub LeftDown()
    mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
End Sub
Public Sub LeftUp()
    mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
End Sub
Public Sub MiddleClick()
    MiddleDown
    MiddleUp
End Sub
Public Sub MiddleDown()
    mouse_event MOUSEEVENTF_MIDDLEDOWN, 0, 0, 0, 0
End Sub
Public Sub MiddleUp()
    mouse_event MOUSEEVENTF_MIDDLEUP, 0, 0, 0, 0
End Sub
Public Sub RightClick()
    RightDown
    RightUp
End Sub
Public Sub RightDown()
    mouse_event MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0
End Sub
Public Sub RightUp()
    mouse_event MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0
End Sub
Public Sub MoveMouse(xMove As Long, yMove As Long)
    mouse_event MOUSEEVENTF_MOVE, xMove, yMove, 0, 0
End Sub
Public Sub SetMousePos(xPos As Long, yPos As Long)
    SetCursorPos xPos, yPos
End Sub
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sat Dec 08, 2007 7:34 am    Post subject: Reply with quote

That would be a Visual Basic module. To add it to your project, goto:

Project -> Add Module

When the dialog appears for adding a module, pick the tab on the top that says 'New', select Module from the picture list, then click Open.

Then double click the module on the solution explorer to the right (default position is the top right corner) of the IDE to open the code editor for the module.

Paste the above code, then go back to MSDN and learn what the API does before you use it.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
DURAN
Newbie cheater
Reputation: 14

Joined: 19 Apr 2007
Posts: 16
Location: The Netherlands

PostPosted: Sat Dec 08, 2007 7:53 am    Post subject: Reply with quote

Wiccaan wrote:
That would be a Visual Basic module. To add it to your project, goto:

Project -> Add Module

When the dialog appears for adding a module, pick the tab on the top that says 'New', select Module from the picture list, then click Open.

Then double click the module on the solution explorer to the right (default position is the top right corner) of the IDE to open the code editor for the module.

Paste the above code, then go back to MSDN and learn what the API does before you use it.

Thanks
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 programming 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