Sign in to follow this  
Followers 0
goodcryan

How to Check if Message box is active on ERP Form

2 posts in this topic

#1 ·  Posted (edited)

Check Image:

http://www.imagesocket.com/photos/guest/2333311

In the image i need to press SEND("ENTER")

if this Message Box dispay.

But My Problem is There is no specific Control that can use to check if this message box is active or not.

This is my sample Code:

;SEND WorkOrder
 
$sCellValue = _ExcelReadCell($oExcel, $myrow, 1)
$wo = _ExcelReadCell($oExcel, $myrow, 3) ;copy WorkORder on Excel and Send to form
 
WinActivate ("Intuitive ERP")
Send($wo)
Send("{TAB}")
sleep(500)
 
 
;Check if there is an Alert Message Display then Press Ok to Continue
Local $windowFound = WinWaitActive("[CLASS:OFormSub; INSTANCE:2]","",2)
if  $windowFound Then
Send("{TAB}")
sleep(100)
Send("{ENTER}")
sleep(500)
Else
;Go to next step
Endif
 
;SEND ISSUE QTY
 
$sCellValue = _ExcelReadCell($oExcel, $myrow, 1)
$qty = _ExcelReadCell($oExcel, $myrow, 4) ;Issue QtyWinActivate ("Intuitive ERP")
Send($qty)
Send("{TAB}")
sleep(500)

I Tried to use WinWaitActive but i failed.

Check if there is an Alert Message Display and Press Ok to Continue
Local $windowFound = WinWaitActive("[CLASS:OFormSub; INSTANCE:2]","",2)
if  $windowFound Then
Send("{TAB}")
sleep(100)
Send("{ENTER}")
sleep(500)
Else
Endif

I really need help for this..

Thanks in Regards

Edited by goodcryan

Share this post


Link to post
Share on other sites



Got The Answer :

;BY PASS MESSAGE BOX
Sleep(500)
$resp=WinGetText("Intuitive ERP")
$getresp=StringInStr($resp, "Issue")
If $getresp=0 Then
Send("{ENTER}") ;pop up
Else
Endif

Thanks !

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  
Followers 0