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 


VB8 click at spot help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
PhantomLancer
Master Cheater
Reputation: 0

Joined: 11 Nov 2007
Posts: 356

PostPosted: Thu May 22, 2008 3:18 am    Post subject: VB8 click at spot help Reply with quote

Okay ive got somewhat of a code but the code isnt working i got the following errors with this code..

Code:
    Private Sub ClickAt(ByVal X As Long, ByVal Y As Long)
        'Click at a certain XY position on the screen.
        SetCursorPos(X, Y)

        Wait(10)
        mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
        Wait(10)
        mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
        Wait(10)
        mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
        Wait(10)
        mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)


'SetCursorPos' is not declared.

And

'mouse_event' is not declared.

ive tried doing

Code:
Declare Function SetCursorPos Lib "user32.dll" () As Long


then it gave me this error

Too many arguments to 'Declare Ansi Function SetCursorPos Lib "winmm.dll"() As Long'.

_________________
Back to top
View user's profile Send private message
Typhoon808
Expert Cheater
Reputation: 0

Joined: 27 Mar 2008
Posts: 175
Location: Wales

PostPosted: Thu May 22, 2008 4:59 am    Post subject: Reply with quote

There are no arguments for the SetCurserPos function. Try using:
Code:
Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos" (ByVal x As Integer, ByVal y As Integer) As Integer


Your function looks like a VB6 declaration with no arguments. Wink
Back to top
View user's profile Send private message
PhantomLancer
Master Cheater
Reputation: 0

Joined: 11 Nov 2007
Posts: 356

PostPosted: Thu May 22, 2008 10:24 am    Post subject: Reply with quote

thanks it helped but now i got to figure out my mouse_events one
_________________
Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Thu May 22, 2008 10:33 am    Post subject: Reply with quote

Search google for something like vb8 mouse_event declaration Wink
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