Jump to content

Recommended Posts

Posted

I am using the AutoIT component in my VB application and playing around with windows mixing it with my VB code. All is great fun and working very well. However, there are few areas that are not responding despite the fact that I am doing everything right according to the documentation. For example:

objAuto.ControlSetText "Web Browser", "", .ControlGetFocus("Web Browser", ""), "Vikas Sethi"

This code should set the text of the box which has the focus to "Vikas Sethi". But it is not doing that. I am also not getting any error because it returns 1 as the value.

Can anyone help?

Posted

I am using the AutoIT component in my VB application and playing around with windows mixing it with my VB code. All is great fun and working very well. However, there are few areas that are not responding despite the fact that I am doing everything right according to the documentation. For example:

objAuto.ControlSetText "Web Browser", "", .ControlGetFocus("Web Browser", ""), "Vikas Sethi"

This code should set the text of the box which has the focus to "Vikas Sethi". But it is not doing that. I am also not getting any error because it returns 1 as the value.

Can anyone help?

The "Web Browser" parameter is wrong maybe?

You are trying to access a control by looking for its title called "Web Browser". Which I think is wrong.

Just use : objAuto.ControlSetText("", "", ControlGetFocus("" ,""), "Vikas Sethi")

That will work.

Try it in notepad first.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...