Jump to content

Crazy Controls


Recommended Posts

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

Link to comment
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.

Link to comment
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!

Link to comment
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?

Link to comment
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
Link to comment
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...
Link to comment
Share on other sites

  • Moderators

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:

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.

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

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