May 21, 2015 09:12 AM
(This post was last modified: May 21, 2015 11:04 AM by MrRapidz.)
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)
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:54 AM
(This post was last modified: May 21, 2015 11:04 AM by MrRapidz.)
(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
|