cappy2112 Posted January 3, 2006 Share Posted January 3, 2006 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 More sharing options...
nfwu Posted January 3, 2006 Share Posted January 3, 2006 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. TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
JerryD Posted January 3, 2006 Share Posted January 3, 2006 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 More sharing options...
cappy2112 Posted January 3, 2006 Author Share Posted January 3, 2006 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 lettersFor which application? Link to comment Share on other sites More sharing options...
seandisanti Posted January 3, 2006 Share Posted January 3, 2006 Did you look at the 2 attachments?>>There's a setting under the Display Property's Advanced settings "Hide underlined lettersFor 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 More sharing options...
cappy2112 Posted January 3, 2006 Author Share Posted January 3, 2006 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 panelI haven't changed this setting, because I didn't even know it existed. Link to comment Share on other sites More sharing options...
seandisanti Posted January 3, 2006 Share Posted January 3, 2006 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 More sharing options...
Moderators SmOke_N Posted January 3, 2006 Moderators Share Posted January 3, 2006 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... 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 More sharing options...
billmez Posted January 3, 2006 Share Posted January 3, 2006 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 hereElseIF ControlFocus("title", "text without &", controlID ) THEN- same stuff hereEndIfYou may have to nest them to test for all possibilities with both controls.HTH,billmezI had my AutoIt app working really well, then it just stopped.The Target App has a dialogue, with the Following Tex fieldsFile name:SaveThen after hours of working on my program, I noticed that those 2 fields had leading ampersands, as inFile &name:&SaveSo 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 crazyAttached 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now