Sign in to follow this  
Followers 0
cappy2112

Crazy Controls

9 posts in this topic

I had my AutoIt app working really well, then it just stopped.

The Target App has a dialogue, with the Following Tex fields

File name:

Save

Then after hours of working on my program, I noticed that those 2 fields had leading ampersands, as in

File &name:

&Save

So I changed the calls to ControlFOcus() and ControlCommand() to use the ampersands.

Now I look at the dialogue and there are no ampersands again.

This dialogue is only invoked from one menu option.

I don't know what is causing the app to add/remove the ampersands, but it's driving me crazy

Attached are screenshots showing the DIalogue with/Without the Ampersands.

I've rebooted because I thought the system was running out of resoruces, but still have the problem

Share this post


Link to post
Share on other sites



Those ampertands mean that when you press Alt+"letter after apmertand", it will give focus/send a command to that control.

And as for why they dissapear and reappear, i have no idea/

Inform te creator of the application of the problem.

Share this post


Link to post
Share on other sites

I would suggest using the control's Control ID (integer - not a string), or it's ClassNameNN instead of it's text in your Control...() statements if the control's text is actually changing.

Also, are you sure the actual control text is changing? There's a setting under the Display Property's Advanced settings "Hide underlined letters for keyboard navigation until I press the Alt key". I can't imagine that the problem is there, but thought I'd throw it in just to confuse the issue more!

Share this post


Link to post
Share on other sites

Also, are you sure the actual control text is changing? for keyboard navigation until I press the Alt key". I can't imagine that the problem is there, but thought I'd throw it in just to confuse the issue more!

Did you look at the 2 attachments?

>>There's a setting under the Display Property's Advanced settings "Hide underlined letters

For which application?

Share this post


Link to post
Share on other sites

Did you look at the 2 attachments?

>>There's a setting under the Display Property's Advanced settings "Hide underlined letters

For which application?

that setting is for windows xp. it's in the display settings when you right click on your desktop and go to properties, or go to display from the control panel

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

that setting is for windows xp. it's in the display settings when you right click on your desktop and go to properties, or go to display from the control panel

I haven't changed this setting, because I didn't even know it existed.

Share this post


Link to post
Share on other sites

I haven't changed this setting, because I didn't even know it existed.

maybe someone else that uses your computer DOES know it exists, and they're using that knowledge against you... waiting until you're away from the computer, then sneaking in and changing it. they might even have a script to just toggle it with registry settings, so they just run that and it only takes them a second...maybe they have it setup to change it at random intervals, just so that your scripts will work for a little while, then suddenly fail without reason... maybe they can read your mind so they know when you're thinking of leaving the computer for a minute so they can change the setting manually... MAYBE they can control your mind so that they can make you change the setting yourself, without even becoming aware of its existence... don't worry, we can walk you through fixing this and making sure it never happens again... first things first, you're going to need a tin-foil hat, and a very sharp knife...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

maybe someone else that uses your computer DOES know it exists, and they're using that knowledge against you... waiting until you're away from the computer, then sneaking in and changing it. they might even have a script to just toggle it with registry settings, so they just run that and it only takes them a second...maybe they have it setup to change it at random intervals, just so that your scripts will work for a little while, then suddenly fail without reason... maybe they can read your mind so they know when you're thinking of leaving the computer for a minute so they can change the setting manually... MAYBE they can control your mind so that they can make you change the setting yourself, without even becoming aware of its existence... don't worry, we can walk you through fixing this and making sure it never happens again... first things first, you're going to need a tin-foil hat, and a very sharp knife...

:P:lmao:


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

There are programs that change title and control text to hamper automation processes. If it only changes between these two states, why don't you test the ControlFocus() and ControlCommand() using IF since they return 1 for success:

IF ControlFocus("title", "text with &", controlID ) THEN

- stuff here

ElseIF ControlFocus("title", "text without &", controlID ) THEN

- same stuff here

EndIf

You may have to nest them to test for all possibilities with both controls.

HTH,

billmez

I had my AutoIt app working really well, then it just stopped.

The Target App has a dialogue, with the Following Tex fields

File name:

Save

Then after hours of working on my program, I noticed that those 2 fields had leading ampersands, as in

File &name:

&Save

So I changed the calls to ControlFOcus() and ControlCommand() to use the ampersands.

Now I look at the dialogue and there are no ampersands again.

This dialogue is only invoked from one menu option.

I don't know what is causing the app to add/remove the ampersands, but it's driving me crazy

Attached are screenshots showing the DIalogue with/Without the Ampersands.

I've rebooted because I thought the system was running out of resoruces, but still have the problem

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