Sign in to follow this  
Followers 0
acer20006

sending keys without controlsend ??

6 posts in this topic

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 ???

Share this post


Link to post
Share on other sites



While 1

$hWnd = WinGetHandle ("seeker")

ControlSend ($hWnd,"","Edit1","{enter}")

WEnd

i need to send {enter} to client window named _seeker_ at minimized state

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

mmmmmmm it's work :)

i will modify the codes to suit my needs

ty mat

No probs.

Not sure what was wrong before but ah well.

Mat

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0