Use ControlClick/Send in Windows 10 Apps

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Bross9132
Posts: 14
Joined: 08 Feb 2018, 09:46

Use ControlClick/Send in Windows 10 Apps

23 Feb 2018, 12:49

Calculator for example, this code sends a number:

Code: Select all

ControlSend, Windows.UI.Core.CoreWindow1, 8, Calculator
BUT
Special keys do not work:

Code: Select all

ControlSend, Windows.UI.Core.CoreWindow1, {Enter}, Calculator
I want to use controlclick/send so that I can send it to a hidden window, anyone know a way?
gregster
Posts: 9001
Joined: 30 Sep 2013, 06:48

Re: Use ControlClick/Send in Windows 10 Apps

23 Feb 2018, 19:32

You can send = instead of enter, and * for x, `/ for divide:

Code: Select all

ControlSend, Windows.UI.Core.CoreWindow1, =,Calculator
ControlSend, Windows.UI.Core.CoreWindow1, *, Calculator
ControlSend, Windows.UI.Core.CoreWindow1, `/, Calculator
But I doubt that you can find keys for all functions of the calculator. But you probably could use Controlclick to click the right spots, if the window is not minimized. Try to move the calculator window to coordinates outside of the actual screen coordinates, so it can stay maximized without been visible/occupying actual screen space (and then move it back to see the result).
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

Re: Use ControlClick/Send in Windows 10 Apps

24 Feb 2018, 01:28

Here's a list of calculator shortcuts I found to add to gregster's reply, for windows calculator: https://www.techlug.com/2013/03/shortcu ... lator.html
Use the same idea. ControlClick is a good alternative too.
I am your average ahk newbie. Just.. a tat more cute. ;)
gregster
Posts: 9001
Joined: 30 Sep 2013, 06:48

Re: Use ControlClick/Send in Windows 10 Apps

24 Feb 2018, 03:10

Nice find! I just tested @ for square root and it works with Controlsend. I am not sure why keys like {Enter} or {Esc} don't work, though.
Bross9132
Posts: 14
Joined: 08 Feb 2018, 09:46

Re: Use ControlClick/Send in Windows 10 Apps

24 Feb 2018, 15:01

Thank you for the replies. However, I was asking a more universal question that applies to all win 10 apps. Specifically, my goal is to take a picture using the camera app while it is hidden in the background. Later on I will use this to take a picture every time I login to my computer. Enter, space, any special key does not work. I have even tried scan codes and VKs...
gregster
Posts: 9001
Joined: 30 Sep 2013, 06:48

Re: Use ControlClick/Send in Windows 10 Apps

24 Feb 2018, 15:11

Well, these apps don't seem to be made for this kind of automation (it still might be possible). But Win 10 apps seem to create a lot of problems; and there might not be a general approach. I only recently updated from Win 7, so I have not much experience with these.

You are planning to take a picture of what exactly? There might be other tools or apps (or scripts) that can do the same thing via command line, which should be more reliable anyway...
Bross9132
Posts: 14
Joined: 08 Feb 2018, 09:46

Re: Use ControlClick/Send in Windows 10 Apps

24 Feb 2018, 15:42

Take a picture of me when I login. I am compiling a whole library for the purpose of securing a user's computer. Some examples containing the watch directory, netsession check to show who is in your C drive (applies to domain), and hopefully this camera one..

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, GollyJer, Lamron750 and 251 guests