Jump to content

Recommended Posts

Posted

I don't think it possible with AutoIt's built in functions. If there are no controls, why do you want to send keystrokes to it? A screenshot of the window may help.

Hallman

Posted (edited)

What I mean is the autoit window info tool doesnt detect any controls.

AutoIt Forum members detect a lack of information. :)

Edit:

@Hallman, A window is one big control in itself.

Edited by MHz
Posted (edited)

@Hallman, A window is one big control in itself.

Well, in that case, what do you use as a control ID? I did a test with notepad and using the notepad window handel as the control ID but it didn't work ...

Edited by Hallman
Posted

Well, in that case, what do you use as a control ID? I did a test with notepad and using the notepad window handel as the control ID but it didn't work ...

I believe the logic is that Notepad does have controls, notably "Edit1". If you set no ControlID, such as "", then there is nowhere on Notepad to ControlSend the string. A cmd prompt in comparison has no ControlID's to use other then the window itself, so ControlSend will send the string to the window (control).

; Title may vary dependant on system
$title = 'C:\WINDOWS'

Run('CMD')
WinWait($title)
ControlSend($title, '', '', 'string of text')

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