Jump to content

How to Check if Message box is active on ERP Form


goodcryan
 Share

Recommended Posts

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
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...