Jump to content

sending keys without controlsend ??


Recommended Posts

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

Link to comment
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

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...