Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Mouse_event doesn't want to right click properly

Hi. I'm having troubles with right clicking with mouse_event

It right clicks fine but it acts like it holds down right click and doesn't let go. Basically the mouse_event(rightclickup) doesn't work properly it seems.

My code:

Code
mouse_event(rightclickdown, 0, 0, 0, 0)
            System.Threading.Thread.Sleep(50)
            mouse_event(rightclickup, 0, 0, 0, 0)

declarements:

Code
Private Const rightclickdown = 8
    Private Const rightclickup = 10
    Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer)
Check this - http://www.homeandlearn.co.uk/NET/nets10p2.html

It may help you ;)
BTC - bc1q3efew3yzfwhdz290dafykaw0a2w56g2j69g2c6
ETH - 0xf1c873217032468990D3313da6509D1b813c4671
USDT - 0xf1c873217032468990D3313da6509D1b813c4671
PP - [email protected]
(May 21, 2015 09:29 AM)SaketSaket Wrote:  Check this - http://www.homeandlearn.co.uk/NET/nets10p2.html

It may help you ;)

This has nothing to do with what I'm trying to achieve :P
Code
mouse_event(rightclickdown, 0, 0, 0, 1)
System.Threading.Thread.Sleep(50)
mouse_event(rightclickup, 0, 0, 0, 1)

Fixed
(May 21, 2015 10:41 AM)$uicidal Wrote:  
Code
mouse_event(rightclickdown, 0, 0, 0, 1)
System.Threading.Thread.Sleep(50)
mouse_event(rightclickup, 0, 0, 0, 1)

Fixed

Can you explain what the change does bro? :P

edit: It doesn't work. It still acts like it just holds down right click.
(May 21, 2015 10:54 AM)MrRapidz Wrote:  Can you explain what the change does bro? :P

edit: It doesn't work. It still acts like it just holds down right click.

Was it doing the same thing before?
(May 21, 2015 11:22 AM)$uicidal Wrote:  Was it doing the same thing before?

Yeah the fix you sent literally changed nothing
Code
mouse_event(&H2, 0, 0, 0, 1)
System.Threading.Thread.Sleep(50)
mouse_event(&H4, 0, 0, 0, 1)
Test that, tell me if it left clicks and releases
(May 21, 2015 11:24 AM)$uicidal Wrote:  
Code
mouse_event(&H2, 0, 0, 0, 1)
System.Threading.Thread.Sleep(50)
mouse_event(&H4, 0, 0, 0, 1)
Test that, tell me if it left clicks and releases

I do already have the left click working and yeah it releases. Idk why right click doesn't.
Replace the variable names with the actual hex values, and make sure you have the right values
(May 21, 2015 11:27 AM)$uicidal Wrote:  Replace the variable names with the actual hex values, and make sure you have the right values

What is the actual hex values for right click?
I tried searching for a list, but couldn't find one.

Private Const rightclickdown = 8
Private Const rightclickup = 10
They're the ones your already had, your issue could be that you're not referencing them as hex values but just numders.

Private Const rightclickdown as Integer = &H8
Private Const rightclickup As Integer = &H10
(May 21, 2015 11:33 AM)$uicidal Wrote:  I tried searching for a list, but couldn't find one.

Private Const rightclickdown = 8
Private Const rightclickup = 10
They're the ones your already had, your issue could be that you're not referencing them as hex values but just numders.

Private Const rightclickdown as Integer = &H8
Private Const rightclickup As Integer = &H10

Lol that fixed it, thanks bro :D


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by SurHommeOct 1, 2022 03:25 PM 9 299 Oct 1, 2022 03:25 PM
Last Post: MeyerWolfsheim
[.NET] by PrisoftApr 18, 2021 09:02 AM 0 140 Apr 18, 2021 09:02 AM
Last Post: Prisoft
[C] by AstateOct 27, 2020 08:15 PM 2 203 Oct 27, 2020 08:15 PM
Last Post: gurlhackerclub