Adam Posted February 26, 2009 Report Share Posted February 26, 2009 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 Quote Link to comment Share on other sites More sharing options...
paul Posted February 27, 2009 Report Share Posted February 27, 2009 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. Quote Link to comment Share on other sites More sharing options...
terrypin Posted February 27, 2009 Report Share Posted February 27, 2009 Paul, Could you remind me briefly what is available in the PGM Macro Library and recommend some basic reading please? -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
paul Posted February 27, 2009 Report Share Posted February 27, 2009 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 Quote Link to comment Share on other sites More sharing options...
terrypin Posted February 27, 2009 Report Share Posted February 27, 2009 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 Quote Link to comment Share on other sites More sharing options...
terrypin Posted March 11, 2009 Report Share Posted March 11, 2009 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 Quote Link to comment Share on other sites More sharing options...
paul Posted March 11, 2009 Report Share Posted March 11, 2009 Since things have changed somewhat since ME4 was released, I was hoping Joe would find time to answer this. Quote Link to comment Share on other sites More sharing options...
joe Posted March 12, 2009 Report Share Posted March 12, 2009 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 usersTry 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. Quote Link to comment Share on other sites More sharing options...
joe Posted March 12, 2009 Report Share Posted March 12, 2009 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.