use macro scheduler to test an application

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
serhanf
Newbie
Posts: 1
Joined: Thu Oct 27, 2005 3:08 pm
Location: HUNGERFORD, UK
Contact:

use macro scheduler to test an application

Post by serhanf » Thu Oct 27, 2005 3:26 pm

Dear Sir/Madam

I am a beginner in using macro scheduler release 7.2.
We are aiming to test our application by using macro scheduler.
We were able to run Macro in conjunction with the application. but when the application crashes, macro keeps working through its script not realising that the application has crashed or failed. So, how could I tell macro to log any application error or logs on when the application crashed.

I would appreciate your assistance
regards
serhan

nkwhftw
Newbie
Posts: 8
Joined: Thu Sep 01, 2005 12:44 pm

Testing a macro

Post by nkwhftw » Fri Oct 28, 2005 1:45 pm

Serhan,
I have found that this is a common problem with most of the Macro Scripts. I hope someone will have a better idea than I have.

What I had to do was write another script in VB6 that would run the script then post the action in a log file. Then have a check on the saved file, my script ran and saved the data in an Excel sheet. The check would be to see if the updated file date and time was by a specific time. If it did not have an updated file listed, the script would rerun Macro Scheduler script again, then check, etc. etc. I ran the script 3 times before abandon. I have to check the log file periodically to insure that the script actually completed. I hope someone can do better!!!!!!!!!!

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Fri Oct 28, 2005 2:51 pm

I think these comments give an unfair impression of Macro Scheduler to someone coming across it for the first time. Macro Scheduler is a tool that will do execute whatever commands you program into your macro, basically it replaces someone looking at the screen and typing on the keyboard.

Macros need to include the same kind of checks that a user makes when running an application. Just as a dumb example, if a user clicks on the excel icon and it doesn't open they stop and figure out what the problem is, they don't just start entering data at the keyboard. Those same kind of checks need to be built into the steps of the macro. My macros are very reliable, but they have safeguards like checking for the existence of windows and processes, the existence, size, date etc. of files and for proper closure of the application if the macro is supposed to start and stop it.

Well engineered Macro Scheduler macros work very well.

Now, if you can give us some specifics about the problems you are having there is great professional support and a bunch of other talented folks on here who are ready to help you.

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Fri Oct 28, 2005 3:39 pm

I'm with Me_Again on this Macro Scheduler is a great tool if you know how to use it.

When you say the application crashes do you get an error window saying the application has encountered a problem and need to close or something like that?
If you do you could use the IfWindowOpen command to solve your problem.


Example

IfWindowOpen>Notepad - [Untitled],donotepad
..
..
Label>donotepad

or, with a wildcard :

IfWindowOpen>notepad*,donotepad
..
..
Label>donotepad


There are other ways but without any details or an example of your script it is almost impossible to help you.

Have a great day,
Rain

JRS
Pro Scripter
Posts: 71
Joined: Thu Nov 04, 2004 5:19 am

Post by JRS » Sat Oct 29, 2005 1:56 pm

Hopefully not being too redundant wih Rain and Me_Again but
Macro Scheduler is a wonderful scripting Windows robot tool but like anything you have to familiarize yourself with it. I suggest looking
at the commands, the syntax of them and then just peruse the many examples in this forum. Well put a well done Macro Scheduler macro is
a very cool thing and the command set really allows for some
very "fine tuning". My opinion FWIW.

Joel S.

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Sun Oct 30, 2005 1:16 am

Timing is another thing to think about. Macro Scheduler will send commands much faster than a user, so try adding some wait commands if the macro is running unreliably. Once it is working reliably you can investigate why the wait is necessary and see if it is possible to control the macro flow more scientifically.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts