UnresolvedCan't use mouse_event to click accept button in League of Legends

Posts 1–14 of 14 · Page 1 of 1
Can't use mouse_event to click accept button in League of Legends
As the title suggests I'm having issues with this.. Any solutions?
Why can't you use it? Just provide some more information.
Simply because the League of Legends client blocks attempts that simulate mouseclicks, which is why I'm looking for other solutions.
BUMP
Any way to simulate it to seem legit (like an input from real hardware?)
There are some ways:


1. Buy a keyboard/mouse wich is able to simulate clicks trough scripts.

2. Code a driver to simulate real hardware -> should work fine

3. But I still can't see why LoL should block all simulations of clicks
Not really experienced enough in VB to code a driver myself.. I was most likely just planning to use some user32 mouseevent thing so Idk what to do now
Quote Originally Posted by Zelcore View Post
Not really experienced enough in VB to code a driver myself.. I was most likely just planning to use some user32 mouseevent thing so Idk what to do now
Well actually you can't code a driver with VB.net, you would need to use C++.


But can you provide the code wich is not working for you?
Because I tried to use mouseevent and it worked.

Did you try to run LoL in windowed mode?
And have you tried your code just on Windows to be sure your code is working?
Nono I think you misunderstood, I want to click the accept button when you find a game and not ingame.
I could post the code but in this case it is irrelevant since it works on all other programs and the only problem is that it can't click the accept button(when you find a game).
Oh wow it turns out that the league client uses DirectInput, which means that SendMessage should work if I focus the control firsthand.
Is it possible to move the mouse using SendMessage? Like for example using &H1(134,232) as a message?
Quote Originally Posted by Zelcore View Post
Oh wow it turns out that the league client uses DirectInput, which means that SendMessage should work if I focus the control firsthand.
Is it possible to move the mouse using SendMessage? Like for example using &H1(134,232) as a message?
So if the code works on other programs, are you sure the Client is in focus and the window itself is active?


Sure it is possible.
It's not VB but C# is very similar check this out: http://stackoverflow.com/questions/3...t-applications
Quote Originally Posted by Zelcore View Post
Oh wow it turns out that the league client uses DirectInput, which means that SendMessage should work if I focus the control firsthand.
Is it possible to move the mouse using SendMessage? Like for example using &H1(134,232) as a message?
If you still need help you can use Blueeye Macro for this, it has it's own virtual driver so it simulates a real mouse/keyboard.
@RoPMadM - Thanks I'll take a look at it! It seems like that solution also uses SendInput which i've tried before and they seem to target keyboardevents instead of mouse so I'm not sure how that would work out since we cannot use alot of SendInput's capabilities with mouse (afaik I might be wrong).
@Deki77 I'm gonna have to use VB for this, but thanks anyway!
You could perhaps use your Mouse Position (System.Windows.Forms)


Private Sub MoveCursor()
' Set the Current cursor, move the cursor's Position,
' and set its clipping rectangle to the form.


Me.Cursor = New Cursor(Cursor.Current.Handle)
Cursor.Position = New Point(x_coord, y_coord)
Cursor.Clip = New Rectangle(Me.Location, Me.Size)
End Sub


Then perform a click.


Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Integer, _
ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, _
ByVal dwExtraInfo As Integer)

mouse_event(&H2, 0, 0, 0, 0)
or
mouse_event(&H4, 0, 0, 0, 0)
No response for more than a week.
Marking it as unresolved.
Posts 1–14 of 14 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?