Sign in to follow this  
Followers 0
jbarchibald

Space in Control Name

3 posts in this topic

I have an older application and there are padded spaces in the name of the control.

for example, one ok button would be ' &OK' and another would be ' &OK'

is there anyway to have autoIT ignore the spaces ?

more specifically I'm using the following command

ControlClick("Form Title", "" , "[TEXT: &OK]")

and unless I get the spaces exactly right, it fails to find the object.

for this application, from past experience with Winrunner, I would prefer to stay away from Control ID's. they are not always the same from machine to machine.

Thoughts ?

- Jason

Share this post


Link to post
Share on other sites



programatically-

ControlClick("Form Title", "" , StringReplace("[TEXT: &OK]"," ",""))

But why not just remove it youself?

ControlClick("Form Title", "" , "[TEXT:&OK]")

Share this post


Link to post
Share on other sites

I have an older application and there are padded spaces in the name of the control.

for example, one ok button would be ' &OK' and another would be ' &OK'

is there anyway to have autoIT ignore the spaces ?

Can you use the "search and replace" option in the menu ?

I always use that for such jobs

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