SendKeys (menu control)

David Mack

Registered User.
Local time
Today, 23:15
Joined
Jan 4, 2000
Messages
53
I have developed the need to operate a third party app late at night. In order to do this, I am using SendKeys. Seems the app opens fine. Once I get through the intro screens which are all dialog boxes, I need to be able to get into some utilities via the third party app menu bar.

All I need to do is pass an <alt>H to get into the right menu. Then, and <alt>U off the subsequent sub menu to get to the correct screen.

I seem to have a focus problem and the <alt>H is not being seem by the app, I think the Access window is seeing the <alt><H>command. It's kind of quick.

The code so far...

Public Sub Regen1()

appX = Shell("D:\APPS\XACT\XM8\x.exe", 3)
AppActivate appX
SendKeys "SUPER", True
SendKeys "{TAB}", True
SendKeys "vor3tex", True
SendKeys "~", True
SendKeys "%H", True 'this is the <alt>H
SendKeys "%U", True
'SendKeys "%{f4}", True 'quit--This works

End Sub

Dave
 
I suppose that ACCESS is simply too fast for the third party program.
You should experiment with DOEVENTS or (better) the SLEEP command between the SENDKEYS commands.
In general, 500 ms are sufficient for the third party programs to respond to ACCESS.
On slower computers you might have to increase the delay.

Good luck!

Els
 

Users who are viewing this thread

Back
Top Bottom