0

所以我必须为我所在的公司自动化一项任务,它涉及到 Attachmate Reflection Extra!(.edp)

我一直在尝试按下 Page Down 键,但没有成功。不适用于 sendcontrolkey,不适用于“RollUp”,不适用于“PageDown”、“PGDN”,没有任何效果。如何在 Attachmate Extra 上按 PageDown?

       strPag = Trim(ExtraEcran1.getstring(13, 2, 8))
            ExtraEcran1.SendKeys "<RollUp>"
        qtdPag = qtdPag + 1

        Do While strPag <> Trim(ExtraEcran1.getstring(13, 2, 8)) And i < 5
            strPag = Trim(ExtraEcran1.getstring(13, 2, 8))
            i = i + 1
            qtdPag = qtdPag + 1
            ExtraEcran1.SendKeys "<PAGEDOWN>"
        Loop

这是来自 Attachmate Extra! 的录制宏,对我不起作用

Dim osCurrentScreen As Screen
Dim osCurrentTerminal As Terminal
Dim returnValue As Integer


Const NEVER_TIME_OUT = 0

Dim ESC As String   ' Chr(rcESC) = Chr(27) = Control-[

Set osCurrentTerminal = ThisFrame.SelectedView.Control
Set osCurrentScreen = osCurrentTerminal.Screen

ESC = Chr(27)

' Press VtNextScreen (Executar a função Próxima tela).
Call osCurrentScreen.SendControlKey(ControlKeyCode_NextScreen)
'Wait for a string on the host screen before continuing
returnValue = osCurrentScreen.WaitForString3(ESC & ">", NEVER_TIME_OUT, WaitForOption.WaitForOption_AllowKeystrokes)
If (returnValue <> ReturnCode_Success) Then
    Err.Raise 11001, "WaitForString3", "Timeout waiting for string.", "VBAHelp.chm", "11001"
End If

另外,这里是额外发送键的代码 https://docs.attachmate.com/extra/x-treme/apis/com/5250functionkeys_des.htm

我

编辑:无法让它以任何方式工作。相反,决定使用很多向下键。

4

0 回答 0