Jump to content

MouseClick not working for tiles on Windows 8.1 start screen


Recommended Posts

Due to arthritis, my Mom has trouble with left mouse clicks.  I found AutoIt and made the simple script below and mapped that script to one of her keyboard buttons so she can use her left hand to effectively do the left mouse click.  This works great for desktop apps, but not for tiles on the Windows 8.1 start screen.  When she hovers over a tile and hits the button, it takes her to the desktop but the app associated with the tile does not open.

I tried associating both 32 bit and 64 bit versions of the program with the au3 files, tried adjusting the compatibility mode of the .exe and also tried having the .exe run as admin.  Nothing changed except in this last case I got the UAC challenge dialog, but upon clicking Yes, still no target app was launched. 

With the same mapped keyboard button on my computer I see the same behavior.  What is really odd - I control her computer remotely using Team Viewer.  When doing that, if I hover over one of her tiles and hit the programmed key on my keyboard it works, but if she hits the key locally on her computer it does not.  Very strange.

Any thoughts on this?

 

##############

#include <Constants.au3>

MouseClick($MOUSE_CLICK_LEFT)

Link to comment
Share on other sites

  • Developers

Not sure how yo uare trying this but this works fine for me in Win10 when the mousepointer is at the correct coordinates as you are not setting them first.

#include <Constants.au3>
send("{LWIN}")
sleep(2000)
MouseClick($MOUSE_CLICK_LEFT)

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Hey, thanks for the quick response.  I am brand new to AutoIt so not familiar with all the intricacies.  The help does not really talk about LWIN and RWIN but I tried your code and while it does work when clicking a tile, it now does not work on desktop apps.  I was hoping to program a single keyboard key to mimic the left mouse click regardless if she is hovered over something in a desktop app or a tile on the start menu.

Maybe if I can test which window is active I could add some conditionals to the script. 

As a side note, using the syntax you suggested, it still doesn't act just like the mouse was clicked.  For me, first the start screen gives way to the desktop, but then the start screen appears again for a moment and then it goes back to the desktop and the target app opens.  Would be nice to be able to clean that up so that it behaves just as if the mouse button was clicked.

Link to comment
Share on other sites

Oh, I see what is happening now.  When the start screen is up and I press the key to run the script, Windows is first switching to desktop and then executing the mouseclick, rather than executing the mouseclick in within the start screen environment itself.  So the syntax you suggested was to get it back to the start screen before the eventual click.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...