Jump to content

Script Work on multiple Windows


Recommended Posts

Run("Notepad")
$hWnd = WinWait("[CLASS:Notepad]")
WinSetState($hWnd, "", @SW_MINIMIZE)
Sleep(1000)
ControlSetText($hWnd, "", "Edit1", "This was set")
ControlSend($hWnd, "", "Edit1", "This was send")

You can set/send text to minimize windows at the condition you can know the control ID of the field you want to fill

Link to comment
Share on other sites

1 hour ago, Nine said:
Run("Notepad")
$hWnd = WinWait("[CLASS:Notepad]")
WinSetState($hWnd, "", @SW_MINIMIZE)
Sleep(1000)
ControlSetText($hWnd, "", "Edit1", "This was set")
ControlSend($hWnd, "", "Edit1", "This was send")

You can set/send text to minimize windows at the condition you can know the control ID of the field you want to fill

Thanks!

I use WinGetHandle to match better, set de title of handle with WinSetTitle and after that i can use without problems when Window is minimized.

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