Results 1 to 6 of 6

Thread: Need help on WaitForString methods in Unix

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    I still don't know what you're trying to accomplish.
    FXi2 might be a SAP code and you're connecting to the APPL Application or the ABAP Object. If so See: https://www.sap-tcodes.org/tcode/fxi2.html

    Here's what I think is happening... You're sending the command "fxi2" somewhere to something. That thing is replying "H" & ESC & "[0m".

    "H" & ESC & "[0m" means "Hello, read you loud and clear. Over."

    Then you send to that thing above,the command "MBRMST", and it replies, ESC & "[0mMBRMST".

    ESC & "[0mMBRMST" means, "Roger. Copy MBRMST. Over"

    Then you send a Tab character, and the thing replies, "_" & ESC & "[12;42H".

    "_" & ESC & "[12;42H" means, "Aye, aye, Sir, will do. Over and Out"

    As you can see, there are two ways to learn what the appropriate Replies from that thing are. Find it's manual, or keep experimenting and keep a list of replies to commands, both the replies that indicate success and those that indicate an error on your part. What the reply actually means doesn't matter, all that matters to you as a Coder is success and failure.



    Myself I would create a Module with a list of Mnemonic Constants for all the replies
    Const fxi2_Ready As String = "H" & ESC & "[0m"
    Const fxi2_MBRMST_Received As String = ESC & "[0mMBRMST"
    Const fxi2_MBRMST_Tab_Received As String = "_" & ESC & "[12;42H"
    That way, when you send an "fxi2", you know the reply should be fxi2_Ready



    BTW, FXI2, (all Caps) is the SAP TCode for Change Report, according the the above link. If that link is relevant, you might want to use some more constants. Like
    Const ChangeReport As String = "FXI2"
    Const DisplayReport As String = "FXI3"
    The purpose would be to make your code self documenting. The more your code reflects human reality, the better the code. At least IMHO.

    Imagine
    osCurrentScreen.SendKeys ChangeReport
    osCurrentScreen.SendControlKey ControlKeyCode_Return
    
    returnValue = osCurrentScreen.WaitForString3(ReadyTo_ChangeReport, _
    NEVER_TIME_OUT, WaitForOption.WaitForOption_AllowKeystrokes)
    Again, if that link is relevant, what your macro is doing is telling the Parent Application (SAP?) to Change Report, Report Type MBRMST. Or sumpin like dat.
    Last edited by SamT; 06-06-2018 at 02:05 PM.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •