Jump to content
Sign in to follow this  
kw_rock

Send commands to programs

Recommended Posts

kw_rock

Quick scripting question with AutoIT.

How would I go about sending a command to a program without having it maximized?

Say I want to send 12345 to notepad.exe while it's open, how would I do that without having the window active?

Thanks in advance :)

Share this post


Link to post
Share on other sites
ludocus

ControlSend

example: ControlSend("Untitled", "", "Edit1", "This is a line of text in the notepad window")

Edited by ludocus

Share this post


Link to post
Share on other sites
MHz

Give this example a try

Run('notepad')
WinWait('Untitled')
ControlSend('Untitled', '', 'Edit1', '12345')

ControlSend() sends the string direct to the control Edit1. AutoIt Info Tool will supply you with control info needed to recognize controls.

:)

Share this post


Link to post
Share on other sites
kw_rock

AutoIT info tool doesn't do anything because it doesn't show me the information for the program i'm trying to use :)!

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  

×