acer20006 Posted December 1, 2009 Posted December 1, 2009 hii all i know that my question is too old & boring _ but i didn't find solution to send key at minimized window / client window i use controlsend but its useless _ it's just sending key at maximize state ControlSend ("-windows title-","","Edit1","{I}") _ all i need _ is to know if autoit had this Feature or not ???
Mat Posted December 1, 2009 Posted December 1, 2009 It won't work with special key combinations but: #Include <GuiEdit.au3> $hWnd = ControlGetHandle ("Untitled - Notepad", "", "Edit1") _GUICtrlEdit_ReplaceSel ($hWnd, "This is a test") Furthermore, "{I}" isn't valid? did you mean: ControlSend ("-windows title-","","Edit1","{I}", 1) Mat AutoIt Project Listing
acer20006 Posted December 1, 2009 Author Posted December 1, 2009 While 1 $hWnd = WinGetHandle ("seeker") ControlSend ($hWnd,"","Edit1","{enter}") WEnd i need to send {enter} to client window named _seeker_ at minimized state
Mat Posted December 1, 2009 Posted December 1, 2009 I can guarantee you that control send can work like you ask. $nPid = Run ("Notepad.exe") WinWait ("Untitled - Notepad") $hWnd = WinGetHandle ("Untitled - Notepad") WinSetState ($hWnd, "", @SW_MINIMIZE) For $i = 1 to 10 ControlSend ($hWnd, "", "Edit1", "This is line number: " & $i & "{ENTER}") Next There are cases where it will not work, simply because the window does not use normal controls. For instance the command prompt window. Mat AutoIt Project Listing
acer20006 Posted December 1, 2009 Author Posted December 1, 2009 I can guarantee you that control send can work like you ask. $nPid = Run ("Notepad.exe") WinWait ("Untitled - Notepad") $hWnd = WinGetHandle ("Untitled - Notepad") WinSetState ($hWnd, "", @SW_MINIMIZE) For $i = 1 to 10 ControlSend ($hWnd, "", "Edit1", "This is line number: " & $i & "{ENTER}") Next There are cases where it will not work, simply because the window does not use normal controls. For instance the command prompt window. Mat mmmmmmm it's work i will modify the codes to suit my needs ty mat
Mat Posted December 1, 2009 Posted December 1, 2009 mmmmmmm it's work i will modify the codes to suit my needs ty matNo probs.Not sure what was wrong before but ah well.Mat AutoIt Project Listing
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