Simulate keystroke for prompts Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
CuriousDad
Posts: 74
Joined: 21 Mar 2023, 11:23

Simulate keystroke for prompts

Post by CuriousDad » 25 Mar 2023, 10:08

I have a program that activates the UAC (User Account Control) prompt every time I open the program. I can press the left arrow and then enter to continue on to that program (no mouse input).

After the script to open the program, I wrote

Send {left} {enter}

to simulate the keystrokes, but nothing happens. There is no error message. Are there certain situations that cannot be replicated with keystrokes or did I program this incorrectly?

Thanks for the help.


[Mod action: Moved topic to v1 section since this is v1 code. The main section is for v2.]

User avatar
mikeyww
Posts: 26936
Joined: 09 Sep 2014, 18:38

Re: Simulate keystroke for prompts  Topic is solved

Post by mikeyww » 25 Mar 2023, 10:28

Hello,

As far as I know, as a security feature, a script cannot interact directly with the UAC dialog.

This may help: https://www.autohotkey.com/docs/v1/FAQ.htm#uac.

CuriousDad
Posts: 74
Joined: 21 Mar 2023, 11:23

Re: Simulate keystroke for prompts

Post by CuriousDad » 25 Mar 2023, 18:46

Thanks. That makes sense from a security point of view.

Post Reply

Return to “Ask for Help (v1)”