Jump to content

Recommended Posts

Posted

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 :)

Posted (edited)

ControlSend

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

Edited by ludocus
Posted

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.

:)

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
×
×
  • Create New...