Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ControlSend[Raw], example 1 not working on latest Windows 11 build #537

Closed
Animan8000 opened this issue Mar 2, 2022 · 2 comments
Closed

Comments

@Animan8000
Copy link
Contributor

Animan8000 commented Mar 2, 2022

WinWait, ahk_pid %PID%  ; Wait for it to appear.
; Send the text to the inactive Notepad edit control.
; The third parameter is omitted so the last found window is used.
ControlSend, Edit1, This is a line of text in the notepad window.{Enter}
ControlSendRaw, Edit1, Notice that {Enter} is not sent as an Enter keystroke with ControlSendRaw.

MsgBox, Press OK to activate the window to see the result.
WinActivate, ahk_pid %PID%  ; Show the result.

Doesn't work. It won't open notepad it seems. This has surely something to do because notepad was changed in the latest Windows 11 build.

@Lexikos
Copy link
Collaborator

Lexikos commented May 2, 2022

Yes, the Notepad we knew is no more, and something completely new by the same name has taken its place. It is a UWP app, not pure Win32, and does not use an Edit control.

I ran the example a few times and at first Notepad started just fine, but after a few tries it began to either not open, or to appear on the taskbar and then disappear. Actually, it's crashing with exception code 0xc000027b whenever I try to launch it minimized.

Notepad has served as a good target in code examples because it was ubiquitous and virtually unchanging...

@Ragnar-F
Copy link
Collaborator

This issue has been fixed via b43bfd4 and can be closed.

@Lexikos Lexikos closed this as completed Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants