Loc Posted September 9, 2021 Posted September 9, 2021 Here I use A to remove the stuff I'm using for myself. This tool when I use Send('a') it disappears, but when I use ControlSend($handle, '', '', 'a') it fails. I don't understand why it doesn't work. Can anyone help me with this situation 😰
Musashi Posted September 9, 2021 Posted September 9, 2021 I'm not entirely sure what you mean, but it works with both minimized and hidden windows. Example() Func Example() Run("notepad.exe", "", @SW_HIDE) ; or : Run("notepad.exe", "", @SW_MINIMIZE) Local $hWnd = WinWait("[CLASS:Notepad]", "", 10) ControlSend($hWnd, "", "Edit1", "A") Sleep(1000) WinSetState($hWnd, "", @SW_MAXIMIZE) Sleep(3000) WinClose($hWnd) WinWaitActive("[CLASS:#32770]") Sleep(500) Send("{TAB}{ENTER}") EndFunc ;==>Example  "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."
Loc Posted September 9, 2021 Author Posted September 9, 2021 This case it's different. Many times using controlsend it's not the same as Send. What I mean here is that it is possible to use controlsend like using Send but not force the window to show
junkew Posted September 10, 2021 Posted September 10, 2021 The 2 functions are different (why should it otherwise be 2 functions) so asking it do the same is not logical to me. but for details see https://www.autoitscript.com/autoit3/docs/functions/ControlSend.htm  ControlSend("[active]", "", "Edit1", "A")  FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
Leendert-Jan Posted September 14, 2021 Posted September 14, 2021 Can you please share (part of) your code?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now