[Tutor] Developing Macro: Is it possible in Python?
Emile van Sebille
emile at fenx.com
Sun Aug 3 18:20:23 CEST 2008
Federo wrote:
<snip>
> Above actions can be easily performed using Macro Scheduler. I am looking for
> possibility to do the same with Python?
Hi Federo,
I regularly combine Macro Scheduler with python by having my python code
write mSched scripts. I find the combination of the two particularly
adept at controlling legacy windows apps on current windows platforms.
The main function accepts a command list and name, writes a .scp msched
script file and invokes the mSched command with os.system.
When I first considered how to approach this in about 2002, I looked at
Mark Hammonds extensions and tried that, but it seemed to me at the time
that the older apps simply didn't play nice and I fought harder to
implement a pure python solution than the problem deserved.
Now, it's easy to review the python created msched scripts and 'follow
along' to catch the odd bug. mSched's capabilities have grown over that
time as well and added some commands that make timing issues more
predictable. Although, I admit I'm never actually in the mSched
environment so I may well be doing things with python that are entirely
doable in mSched. But, with python as glue I can control and coordinate
as many disparate environments as the solution requires and it's mostly
quick and easy.
Emile
More information about the Tutor
mailing list