Jump to content
Sign in to follow this  
CaptainBeardsEyesBeard

How do I access this amount in visible text?

Recommended Posts

CaptainBeardsEyesBeard

Hi

 

I have a strange form I'm trying to access the Amount for

 

I tried accessing it via this code with no success.

 

 

 

Local $hWnd = WinWait("Cost Entry", "", 10)
;obtain the text in that window which should be "Successfully Saved records for RSA1"
Local $RecordSaveSuccess = ControlGetText($hWnd, "", "Static2")
Sleep(1000)
if StringInStr($RecordSaveSuccess, $Rate) then
   MsgBox($MB_SYSTEMMODAL, "Test" & $TestCount & "  Result", "Test Passed, Cost entry Saved", 4)
      FileWrite($hFilehandle, @CRLF & "Test" & $TestCount & " Create a new cost using timekeeper" & $Timekeeper & " Ensure Timekeeper saves     " & $RecordSaveSuccess & " Test Passed")

   Else
   MsgBox($MB_SYSTEMMODAL, "Test" + $TestCount & " Result", "Test Failed", 4)
         FileWrite($hFilehandle, @CRLF & "Test" & $TestCount & " Create a new timekeeper using " & $Initials & "    Ensure timekeeper saves     Test Failed" & $RecordSaveSuccess)
   Exit

EndIf

 

1.PNG

Share this post


Link to post
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
Sign in to follow this  

×