Jump to content
Macro Express Forums

Structured Programming

Recommended Posts

Has anyone ever experimented with structured programming methods? Before I retired, I began creating extremely complex macros using structured programming to create what can be thought of as subroutines with repeatable calls and returns dependent on the values of certain variables to control the logical flow. It brought Macro Express programming up to the level of the more advanced languages. I highly recommend it.

Link to comment
Share on other sites

19 hours ago, Jeff said:

It brought Macro Express programming up to the level of the more advanced languages

Yes and no.  Lots of nice features in ME that make it easy to do stuff beyond keyboard and mouse functions.  For simple jobs it's quick and easy, but then one can get sucked in to using it beyond where its strengths are.  As a high-level language, the fact that you have to define your own inter-module structure means my techniques will probably differ a lot from yours.  Like the days when every bicycle mechanic became his own automobile manufacturer -- eventually Henry Ford had a better idea.  ME works nicely as one tool in the box but doesn't replace the whole box. 

Link to comment
Share on other sites

I’m not sure exactly what you mean by structured programming? If not simply using ‘sub macros’ widely, as I expect most experienced users do, then could you give an example please?

One downside in MX Pro is managing variables reliably across the constituent sub macros. I’m not a programmer but I assume that’s not an issue with modern programming languages.

Link to comment
Share on other sites

  • 2 weeks later...

I learned some programming back in the 80's but lost it as I entered my career as a mechanical product designer. Many years ago I got into using MEP and it was an easy way to get into some automation. I started getting a lot of work making huge macros doing some real heavy lifting. But keeping them running and dealing with timing and other issues became a nightmare. I looked online to see how others did it and started writing simple helper scripts in VBScript and then I realized I really just needed to get back into proper programming. Let me tell you... Once I learned VB.NET and made my first simple scraper I slapped myself around for a week. It was so much simpler and many orders of magnitude faster and robust.

I think many people are like me and use MEP for simple user one-off operations, then start trying to do really big things with it. This is a mistake. At this point one needs to learn a proper programming language and there are so many easy ones out there. .NET is astronomically more capable than MEP. Really wanting MEP to be more like a proper programming language is wrong. If you need that, then go on to an extant programming language. It's easier than you think. MEP should stay like it is and it's functions should only be for the user efficiency macros. E.G. I don't want to ever see MEP get database commands. It's a brilliant program and I'd rather it stay simple and useful for non-programmers.

Link to comment
Share on other sites

  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...