Jump to content
Macro Express Forums

Parameters


Recommended Posts

External scripts can pass in parameters. "Macro Run" does not, as far as I know.

 

After about 10 hours of testing to figure out how the variable scope chain works, I think I figured out a way to create an in-memory truly global variable scope (no registry, env vars, files, etc). That's the good news. Bad news is that I don't have time to build a production-quality implementation and test it before I have to produce a deliverable tomorrow.

 

One important criteria for tomorrow is script readability. Semi-technical users may be modifying them.

 

Out of curiosity, if you're working in the scripting editor, what parameter passing methods have you found to be the most visually concise? For example, variable set string on one line, then macro run on the next line, requires two lines... even more if there are multiple variables another macro requires. One line macro run commands would be nice, but I haven't seen a way to implement that in a simple looking fashion.

 

To contrast that question, what parameter passing methods have you found to be best for execution speed?

 

Cheers!

 

Adam

Link to comment
Share on other sites

Our PGM Library supports the passing of multiple parameters, as follows:

Variable set string %xx% "FunctionName, Parameter1, Parameter2, ...ParameterN"

Write Registry String %xx% to "RegistryValueName"

Macro Run MacroController

Thus 3 lines of code are always required for calling a macro requiring 0 to n parameters. Plus, of course, the code to retrieve returned values.

 

Parameters passed can be named, e.g. Param1=123, Param2=abc, or in sequence.

The macro MacroController relies on finding a set of definitions at the top of each called macro specifying macro name, macro parameter names, macro parameter shortnames, macro parameter types (e.g. input, output), macro parameter data types (e.g. decimal, integer, string).

The initial effort to design and establish the required structure (uses the registry) and the macro MacroController was considerable, but it works well and seems quite fast.

Link to comment
Share on other sites

For reading you can't go past Joe Weinpert's book "Macro Express Explained"

http://www.macros.com/macexplained.htm

 

And as to what the PGM Library contains, try this link:

PGM Library Functions

 

Thanks. Bought Joe's excellent book a long time ago. I was thinking more about an introduction to installing and using the PGM Library and its macros. I guess most of that is covered on the site?

 

As to the actual macro downloads I thought I had the library already but couldn't locate it. So maybe I didn't transfer it to this PC a year or so ago. Anyway, on the assumption that it has probably changed since the version that came on the CD with Joe's book, I just downloaded pgmfl.exe. But I didn't see see any installation instructions and on executing it seemed to unpack files - but where?

 

Meanwhile I've therefore now run the setup program from the CD (seems same size at 4.43 MB, so maybe it is still unchanged?) and that worked OK. I'm at the stage now pending reboot. The message on completion mentions a license. Is that information on your site too please?

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

  • 2 weeks later...
Thanks. Bought Joe's excellent book a long time ago. I was thinking more about an introduction to installing and using the PGM Library and its macros. I guess most of that is covered on the site?

 

As to the actual macro downloads I thought I had the library already but couldn't locate it. So maybe I didn't transfer it to this PC a year or so ago. Anyway, on the assumption that it has probably changed since the version that came on the CD with Joe's book, I just downloaded pgmfl.exe. But I didn't see see any installation instructions and on executing it seemed to unpack files - but where?

 

Meanwhile I've therefore now run the setup program from the CD (seems same size at 4.43 MB, so maybe it is still unchanged?) and that worked OK. I'm at the stage now pending reboot. The message on completion mentions a license. Is that information on your site too please?

 

--

Terry, East Grinstead, UK

 

Any hope of a reply please? I'm still hoping for some more information or a pointer on where to find it please. Meanwhile I tried a few macros and see that they require a password. So I assume that confirms that a license must be bought. Yet I see nothing about that on the site. Hence my follow up query a couple of weeks ago.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

There is only a license after the 30-day trial has expired. There is only a 30-day trial period for XP. A Vista installation cannot have a trial period due to the way it handles security issues, therefore, a purchase is required with a 30-day money back guarantee.

 

The trial period for XP contains no source code, but the purchase options (with a 30-day money back guarantee) contains all the source code. Here is how it is spelled out in the website:

 

Windows XP users

Try the PGM Functions Library free for 30 days*. Use beyond 30 days requires that you purchase a license.

 

Vista users

A trial version of the PGM Functions Library is not available for Windows Vista users. Use requires that you purchase a license.

Link to comment
Share on other sites

External scripts can pass in parameters. "Macro Run" does not, as far as I know.

 

After about 10 hours of testing to figure out how the variable scope chain works, I think I figured out a way to create an in-memory truly global variable scope (no registry, env vars, files, etc). That's the good news.

Floyd, I and the rest of the community are interested in knowing your solution. Please advise.

Link to comment
Share on other sites

Join the conversation

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

Guest
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.

Loading...
 Share

×
×
  • Create New...