Re: Implementing a Macro Language

From: Jonathan Wood (jwood_at_softcircuits.com)
Date: 06/14/04


Date: Mon, 14 Jun 2004 10:14:54 -0600

Kurt,

> I have done what you are thinking of doing, and it wasn't too
> difficult. It's better if you can design the program with the
> automation in mind.

Did you use COM automation, or some custom solution?

> 1. Are the commands going to be read from a text file, or will they be
> issued cross-process via another progam?

Well, if I implemented COM Automation, then I assume they'd be issued
cross-process via another program. But I was wondering about something
simpler. Macros would be loaded from and saved to disk but I didn't plan to
store them in text format.

> 2. Do you have to be able to macro absolutely everything in the user
> interface, or can you restrict the macroable to a subset of your
> program?

Probably a subset. I don't really see a reason to automate setting options,
for example. While search and replace options will definitely need to be
automated.

> 3. Do you intend this to be a one-time language design such that the
> macro language will never change? If you do intend to evolve the
> macro language then will you provide your customers with tools for
> porting their macros to the more modern version, or will you continue
> to support all previous versions, or will you simply cease to support
> macros intended for the previous version? (Simply: How much will this
> be changing?)

It may change a little over time, mostly to handle new features added to the
program.

> 4. Do any of the functions that you intend to provide a macro
> interface for require a long time to execute? For those that do, you
> need an effective way to gracefully wait for their completion.

They could. I'm not sure why this would be an issue unless you have COM
Automation in mind.

> I have often provided a method of automating a limited part of my
> programs through reading instructions from text files. One command
> per line, simple parsing, no expression evaluation... just a simple
> script. This is fairly easy.

Right. Although I was thinking of "compiling" the instructions when they are
saved in the program, thereby storing macro information that could be
processed faster.

> I have also gone as far as to hide a complicated program entirely and
> to run it invisibly via another program I created which had a simpler
> user-interface. This required automating certain sequences while
> others were merely passed through directly to the slaved program. The
> goal was to hide a bad user interface from operators who would have
> been hopelessly confused by it. In a case like that, I like to create
> an ActiveX control which encapsulates all of the functions which I
> intend to pass through whether a given function is complicated and
> requires many steps, or whether it might be a simple pass-through, it
> has properties and methods exposed in the ActiveX control.

Well, I wouldn't be doing anything like that.

> So, if you can give me some more particulars, I may be able to provide
> some more specific suggestions.

I"m not really sure what you have in mind but I'm open to all suggestions.

Thanks.

-- 
Jonathan Wood
SoftCircuits
http://www.softcircuits.com
Available for consulting: http://www.softcircuits.com/jwood/resume.htm


Relevant Pages

  • Push a single contact through to excel
    ... I am new to macros but see that they will greatly help to run my small ... loaded with the next stage of macro-powered automation. ... I recieve enquiries both via email and by phone. ... to automatically add a new contact's information into a prepared SOURCE ...
    (microsoft.public.outlook.program_vba)
  • Push single contact field data into prepared excel workbook
    ... I am new to macros but ameager to get some formulated to help run my small ... loaded with the next stage of macro-powered automation. ... I recieve enquiries both via email and by phone. ... a reference code necessry for filing etc) Their full address, phone number, ...
    (microsoft.public.outlook)
  • Re: Big Trouble at the little relief hut
    ... This is essentially automation even if it initiated ... You can still write macros that automate a process. ... Even addons can implement some form of automation, ... reagents whenever they tank to a reagent vendor. ...
    (alt.games.warcraft)
  • Re: Big Trouble at the little relief hut
    ...  Some behaviors may be considered unfair by the community ... This is essentially automation even if it initiated ... They don't fully restrict being able to automate via macros or even ...  Even addons can implement some form of automation, ...
    (alt.games.warcraft)
  • Re: Photo field in Form
    ... Adding Automation to your Word forms. ... Learn more VBA (macros) to automate your forms. ... ActiveDocument.Protect wdAllowOnlyFormFields, NoReset ... Please reply to the newsgroup unless you wish to avail yourself of my ...
    (microsoft.public.word.drawing.graphics)