Jump to content

ControlClick in apps


Recommended Posts

Hello everyone, I have been beating my head against the wall all day today over this and am hoping someone can help. I work for a company who makes assistive technology and I have multiple consumers who want to use the Mail app included in Windows 10. Most of these consumers are using eye tracking technology so the MouseClick is not an option since their eyes are constantly controlling the mouse cursor so it would be a battle between that function and their eyes. And hence I need to use ControlClick. I'm having problems with it though, I can't get it to click anything in the app. I've been left clicking on things with no apparent luck. However, when I changed it to right click, something very interesting happens, the window menu (the one you get when you hit ALT + SPACE) opens every time the ControlClick runs, regardless of the X,Y coordinates as if it is right clicking at the top left of the window every time.

Based on the Window Info, the entire app is one big control whose position is 0,40 and the size is 1440,838.

Does anybody have any ideas why I can apparently only click on the top left corner of the app? Any direction is greatly appreciated!

 

Opt('MouseClickDownDelay', 100)
Opt('WinTitleMatchMode', 2)
Local $hWnd = WinActivate('Gmail')
$inc = 30
For $hi = 1 To 10 Step 1
    $hadj = $hi * $inc
    For $i = 1 To 10 Step 1
        $adj = $i * $inc
        $j = ControlClick($hWnd, "", "[CLASS:ApplicationFrameInputSinkWindow; INSTANCE:1]", "Right", 1, $hadj, $adj)
        MouseMove($hadj, $adj, 3)
    Next
Next

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...