Jump to content

Do Until Loop does not stop


Recommended Posts

Good Morning.

In SAP I have to check if a special Field is available after switching to the Tab "Detail".  

image.png.1026436891ac952cc071fafc6e934f77.png

I´m using this script:

Global $hNDL = 0
While (1)
    If WinExists("FIS/edc® Rechnungsmonitor - MM Detailbild ändern") Then
         Do
            MouseClick($MOUSE_CLICK_LEFT, 300, 200, 2)
            MouseMove(215, 323)
            MouseDown($MOUSE_CLICK_LEFT)
            MouseMove(258, 323)
            MouseUp($MOUSE_CLICK_LEFT)
            Send("^c")
            $hNDL = ClipGet()
            Sleep(5000)
         Until $hNDL = "3030"
    EndIf
WEnd

It works so far. The value "3030" is copied to the clipboard. But the loop doesn´t stop. Why?

Link to comment
Share on other sites

Ok I awnser my own question. :) Got it. Simply deleted While-Loop. 

Do
            MouseClick($MOUSE_CLICK_LEFT, 300, 200, 2)
            MouseMove(215, 323)
            MouseDown($MOUSE_CLICK_LEFT)
            MouseMove(258, 323)
            MouseUp($MOUSE_CLICK_LEFT)
            Send("^c")
            $hNDL = ClipGet()
            MsgBox($MB_SYSTEMMODAL, "", $hNDL)
            Sleep(5000)
         Until $hNDL = "303"

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...