Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Macro Reliability
#1
Hi!

I'm looking for some automation software to purchase for my company. This is the first software I've tried and so far its working well most of the time! The task I'm trying to automate is one between Excel and a software we use to perform calculations. Currently I'm using keystrokes to navigate through the menus and options of both programs. I have the script written but it will only work correctly some of the time and I think my approach of controlling it through keystrokes is the problem. Also it will make mistakes when running on another computer.

Can someone suggest ways to improve the reliability of a macro? Can I replace the keystrokes for "lower level" programming? To be honest I'm not really sure what I'm asking but I feel like I should be able to improve the reliability by using more advanced language.

Thanks for any help!
#2
Navigating through menus and options using keys usually is reliable, but often you have to insert "wait for window" commands. In most cases these commands are inserted when recording. Sometimes you may have to insert simple wait commands.

there are several alternative (low level) ways. You'll find most of them in floating toolbar -> windows, controls menu. Not everything works in all windows.

To get/set excel cells, run excel macros, etc, can be used functions of ExcelSheet class.
#3
you can also call menu commands that for a program by using "men" command.
it turns out that many progs number the menu items and you can call them by using their id numbers.

you can get this info by hitting c+a+s+r and checking the "menu" checkbox. when you create the new macro it'll put it in a format like this

Function WA_Rewind
Trigger 1 //FF_Keyboard2     Help - how to add the trigger to the macro
Code:
Copy      Help
men 40144 win("" "Winamp v1.x")

you can also check out my blog for more ideas on implementation (see sig below for url).
An old blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 1 Guest(s)