Results 1 to 7 of 7

Thread: If BUT (2002)

  1. #1
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    If BUT (2002)

    If pcommPS.GetText(1, 26, 19) <> "SERVICE WORK SCREEN" Then
    pcommPS.SendKeys "[clear]"
    pcommOIA.WaitForAppAvailable 5
    pcommOIA.WaitForInputReady

    pcommPS.SetText "3", 20, 42 'Mainscreen "3"
    pcommOIA.WaitForAppAvailable 5
    pcommOIA.WaitForInputReady

    pcommPS.SendKeys "[Enter]"
    pcommOIA.WaitForAppAvailable 5
    pcommOIA.WaitForInputReady

    pcommPS.SetText "2", 21, 39 'Mainscreen "3" > "2"
    pcommOIA.WaitForAppAvailable 5
    pcommOIA.WaitForInputReady

    pcommPS.SendKeys "[Enter]"
    pcommOIA.WaitForAppAvailable 5
    pcommOIA.WaitForInputReady

    pcommPS.SendKeys "[pf5]"
    pcommOIA.WaitForAppAvailable 5
    pcommOIA.WaitForInputReady
    End If

    BUT:

    If pcommPS.GetText(3, 16, 52) <> "B A N K C A R D S Y S T E M M A I N M E N U" Then

    Ignore the first "[clear]" statement.

    So, if NOT "service work screen" DO ALL UNLESS "B A N K C A R D S Y S T E M M A I N M E N U", in which case DO PART.

    Not sure how to lay out.....

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: If BUT (2002)

    Does this do what you want?

    If pcommPS.GetText(1, 26, 19) <> "SERVICE WORK SCREEN" Then
    If pcommPS.GetText(3, 16, 52) = "B A N K C A R D S Y S T E M M A I N M E N U" Then
    pcommPS.SendKeys "[clear]"
    End If
    pcommOIA.WaitForAppAvailable 5
    pcommOIA.WaitForInputReady

    pcommPS.SetText "3", 20, 42 'Mainscreen "3"
    pcommOIA.WaitForAppAvailable 5
    pcommOIA.WaitForInputReady

    pcommPS.SendKeys "[Enter]"
    pcommOIA.WaitForAppAvailable 5
    pcommOIA.WaitForInputReady

    pcommPS.SetText "2", 21, 39 'Mainscreen "3" > "2"
    pcommOIA.WaitForAppAvailable 5
    pcommOIA.WaitForInputReady

    pcommPS.SendKeys "[Enter]"
    pcommOIA.WaitForAppAvailable 5
    pcommOIA.WaitForInputReady

    pcommPS.SendKeys "[pf5]"
    pcommOIA.WaitForAppAvailable 5
    pcommOIA.WaitForInputReady
    End If

  3. #3
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: If BUT (2002)

    I............. think so. Except?? = should be <> ?? The logical part of my brain has gone out (again).

    Overall:
    If "SWS" do nothing.
    Else
    If not "SWS" and not "BSMM" do "[clear]"
    Else
    Do all except "[clear]"

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: If BUT (2002)

    You originally asked
    <hr>If pcommPS.GetText(3, 16, 52) <> "B A N K C A R D S Y S T E M M A I N M E N U" Then

    Ignore the first "[clear]" statement.<hr>
    i.e. if not "BSMM" then ignore clear, or in other words, if "BSMM" then clear. That's the code I proposed. You now appear to reverse the condition: If not "SWS" and not "BSMM" do "[clear]"

    <big>YOU</big> will have to decide which of the two is correct.

  5. #5
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: If BUT (2002)

    My apologies, my first post should have read:

    BUT:

    If pcommPS.GetText(3, 16, 52) = "B A N K C A R D S Y S T E M M A I N M E N U" Then

    Ignore the first "[clear]" statement.

    Thanks

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: If BUT (2002)

    Yes but if but no but if but yes...

    In that case, you should indeed use <> instead of = in the second If ... Then line.

  7. #7
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: If BUT (2002)

    OK, Thanks Vicky! <img src=/S/rofl.gif border=0 alt=rofl width=15 height=15>

Posting Permissions

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