How do I handle info box?

Discuss RoboTask here
Post Reply
robertlb
Posts: 7
Joined: Wed May 14, 2008 7:33 am
Location: United States
Contact:

How do I handle info box?

Post by robertlb »

Hello all,
I'm using RoboTask to automate some reports for my boss.  One of the reports requires entering a beginning date and and ending date.  The ending date defaults to todays date.  However, I have to enter the beginning date, which is no problem.  Since the report is a Month To Date report, I simply have RoboTask enter the current month and year and then enter 01 for the day.
Early in the month it is quite possible to have no records to display on the report.  When this happens, a pop-up box appears.  The title of the box is "Information".  The text in the box reads "No records matching scope options were returned."
When this occurs, I want to click the "OK" button and change the beginning date's month to the previous month (currentmonth-1).
I know I need to use an "IF-THEN" statement, but I have no clue what to look for.  Can anyone on this forum give me a few step by step instructions on how to check for this box's exsistence?
I've downloaded some of the sample scripts but I didn't see any that looked like this problem.
Thanks,
Robert
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

How do I handle info box?

Post by Oleg »

Try to use {WindowExists()} variable. This variable checks the existence of window with specified caption. Also you can try {IsWindowActive()}
Your task will be approx such:

run report
pause a few seconds
if {WindowExists(Information)}=True then
   click OK //or send Enter key to active window
end if
Last edited by Oleg on Fri Jul 04, 2008 4:16 am, edited 1 time in total.
Post Reply