1

Attachmate Reflections Standard Suite 2011 R2 を使用し、ソース データセットに Excel を使用します。自動化しようとしている端末では、情報を送信するために F9 キーが必要でしたが、そのキーを送信しようとすると、「指定されたキーが辞書にありませんでした」というエラーが表示されます。端末アプリケーションに送信しようとした他のすべてのキーは正常に機能しているようです。以下はコード スニペットです。

sub TerminalTest()
Dim app As Attachmate_Reflection_Objects_Framework.ApplicationObject
Dim frame As Attachmate_Reflection_Objects.frame  

Set app = GetObject("Reflection Workspace")
Set frame = app.GetObject("Frame")
Set MGlobals.gScreen = frame.SelectedView.Control.Screen
With MGlobals.gScreen
    .SendKeys "A"
    .SendKeys "123"
    .SendKeys "456"
    .SendControlKey ControlKeyCode_Return
    .SendKeys "780ABC"
    .SendControlKey ControlKeyCode_Return
    .SendKeys "ZYX"
    .SendControlKey ControlKeyCode_Return
    .SendKeys "TEST"
    .SendControlKey ControlKeyCode_Return
    .SendControlKey ControlKeyCode_F9
End with
End sub

リフレクション API のドキュメントでは、関数キーに ControlKeyCode_F9 を使用することが示されていますが、コードがエラーをスローしているため、私は少し途方に暮れています。

任意のヘルプが表示されます。

4

1 に答える 1