hello, everybody.

I need to test if a value stored in clipboard (got by Crtl+C) meet a certain condition. The macro is dependent ot that.

But nothing ot I tried worked so far. I need help.
The macro is for manipulate a java terminal emulator (IBM HOD)


My current code is below. I reduced to better undertanding:

Sub atucredor()


    Dim cpf As String
    Dim bco As String
    Dim ag As Integer
    Dim cta As Double
    Dim clipboard As String
    


    AppActivate "Terminal 3270 - A - AWVL6661"
    Application.Wait (Now + TimeValue("0:00:01"))
        
    For i = 2 To 2
        cpf = Worksheets("atucredor").Cells(i, 1)
        bco = Worksheets("atucredor").Cells(i, 3)
        ag = Worksheets("atucredor").Cells(i, 4)
        cta = Worksheets("atucredor").Cells(i, 5)
            
        Application.Wait (Now + TimeValue("0:00:01"))
        SendKeys cpf, True
        Application.Wait (Now + TimeValue("0:00:01"))
        SendKeys "{ENTER}", True
        Application.Wait (Now + TimeValue("0:00:01"))
        SendKeys "{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}", True
        Application.Wait (Now + TimeValue("0:00:01"))
        SendKeys "+{RIGHT}", True
        Application.Wait (Now + TimeValue("0:00:01"))
        clipboard = "^c"
        SendKeys clipboard, True
        Application.Wait (Now + TimeValue("0:00:02"))
        SendKeys "+{ESC}"


        If clipboard = "A" Then


        SendKeys "{F12}", True
        clipboard = ""
        Else
        Debug.Print clipboard
        End If
        Next