Windows NT ALT + menu letter not working (works in W2K)

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
stefmit
Newbie
Posts: 8
Joined: Wed Feb 11, 2004 4:35 pm

Windows NT ALT + menu letter not working (works in W2K)

Post by stefmit » Tue Feb 17, 2004 9:43 pm

This is really odd - I wonder what could cause this. As probably noticed from my other two postings, I am struggling with creating a script for Oracle/Java applications. Besides having no control over the "Java windows" (the ones created temporarily "inside" the browser), as far as focus/title goes (for which I am just putting long delays in, to make sure they're up, eventually), I have also run across a very weird problem: I want to access the main menu of a browser window (for which I have control over), and a sequence like this:

Press ALT
Send Character/Text>ta
Release ALT

gives me, under W2K, the menu option whose highlighted letter is "t", then its submenu option whose highlighted letter is "a".

Under Windows NT, though, the ALT seems to highlight the first menu option, and opening it (which option is - usually - "File"), even though File has highlighted - obviously - the letter "f"!!! Does anybody know why this happen, and how could I avoid it?!?

Thx,
Stef

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Feb 17, 2004 10:45 pm

I have also run across a very weird problem: I want to access the main menu of a browser window (for which I have control over), and a sequence like this:

Press ALT
Send Character/Text>ta
Release ALT

gives me, under W2K, the menu option whose highlighted letter is "t", then its submenu option whose highlighted letter is "a".

Under Windows NT, though, the ALT seems to highlight the first menu option, and opening it (which option is - usually - "File"), even though File has highlighted - obviously - the letter "f"!!! Does anybody know why this happen, and how could I avoid it?!?
Just a few thoughts...............

:idea: For a moment, forget the OS, and provide some info on the browsers. There may be differences.
What browser and version are you using on the NT system?
What browser and version are you using on the 2K system?

:idea: It may be necessary to put a Wait>n value after the Press ALT Key.

:idea: It may be necessary to split the "t" and the "a" commands with a Wait>n.

:idea: You may also want to look at using SK_DELAY, I have found that setting Let>SK_DELAY=2 has worked well for me on many scripts. I usually use that as a default on all scripts.

:idea: Also note that some ALT keys may be Case Sensitive on different programs.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

stefmit
Newbie
Posts: 8
Joined: Wed Feb 11, 2004 4:35 pm

Post by stefmit » Tue Feb 17, 2004 11:00 pm

:idea: For a moment, forget the OS, and provide some info on the browsers. There may be differences.
What browser and version are you using on the NT system?
What browser and version are you using on the 2K system?
IE 5.xx on both
:idea: It may be necessary to put a Wait>n value after the Press ALT Key.
I did
:idea: It may be necessary to split the "t" and the "a" commands with a Wait>n.
Did that, also
:idea: You may also want to look at using SK_DELAY, I have found that setting Let>SK_DELAY=2 has worked well for me on many scripts. I usually use that as a default on all scripts.
Set it up for 2, prior to posting
:idea: Also note that some ALT keys may be Case Sensitive on different programs.
All are lower case

I did all of the above, based on a previous posting of yours and lumumba (?!? - sorry if I got the name wrong), that I found somehow related.

Here is more to the oddity: I said - OK, let's assume I always get to the FIle menu option - so, based on this assumption, I started looking for the menu entry not by using letters, but rather the directional keys (e.g. my t menu entry was the fourth after the File one, so I Press Right * 4, and my a one was the third down, after getting to the horizontal position, so I did Press Down * 3 - and still didn't work (I get like three spaces to the right, for four times the Right key, and only one for three times the Down key ...

Thank you for your suggestions - I think I will have to try increasing the timings (I did Waits of 2-5 sec ... perhaps more?!? - sounds really odd, though, besides the fact that my macro is to be used in conjunction with time stamps and network measurements, so it could really become ... useless ...

Thx again,
Stef

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Feb 17, 2004 11:28 pm

I started looking for the menu entry not by using letters, but rather the directional keys (e.g. my t menu entry was the fourth after the File one, so I Press Right * 4,
You may also have to press Right more than 4 times. (You may have already considered that too, but this info may be helpful to someone else).

Some of the first three choices may actually have sub menus that will expand to the right, taking up one or more of the "right" moves. So be sure to count the "right"s that are needed slowly, allowing for each horizontal menu to pop up and be processed. The macro won't wait for the popup to show, but it will be there.

Also be sure that both systems have the same Browser Add-ins and options, or the sub menus may also be different. Again, this may affect how many "rights" are needed.

Another concern, does your menu system use Microsoft's Horrible Menu Feature that only shows the most recent choices on your menus? This can also be different each time you run, again affecting the counts.

Re using Press>Right*4, again, perhaps you need a separate Wait>n between each Press>Right, making four commands vs. one?

All in all, I would try to keep working for a true Key Value like your original posting.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts