Sign in to follow this  
Followers 0
ma4xat

Attach AutoIt Script to a Opened Program

4 posts in this topic

Hi, im novice in this program.

i Want to know that how can i attach autoit to a opened program, and send keys ( inclusive if the program is minimized ).

I just get the Handle with: WinGetHandle

but dont know how to send keys to this handle directly,.

i dont want to set to active this windows, just get minimized.

Its possible?

Share this post


Link to post
Share on other sites

#2 ·  Posted (edited)

Hi, im novice in this program.

i Want to know that how can i attach autoit to a opened program, and send keys ( inclusive if the program is minimized ).

I just get the Handle with: WinGetHandle

but dont know how to send keys to this handle directly,.

i dont want to set to active this windows, just get minimized.

Its possible?

Read in help file about ControlSetText and ControlSend.

Look here an example:

AutoItSetOption ("WinTitleMatchMode",2)
Run("Notepad.exe")
WinWait("Notepad")
WinSetState("Notepad","",@SW_MINIMIZE)
ControlSetText("Notepad","","[CLASS:Edit;INSTANCE:1]","This is a test")
Edited by Andreik

When the words fail... music speaks

Share this post


Link to post
Share on other sites

What about this:

[CLASS:Edit;INSTANCE:1]

Is always the same ?

Share this post


Link to post
Share on other sites

What about this:

[CLASS:Edit;INSTANCE:1]

Is always the same ?

Yes. Use AutoIt Window Info to get controlID or classname from a window. :)

When the words fail... music speaks

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