Lucas Posted October 26, 2004 Report Share Posted October 26, 2004 Help Quote Link to comment Share on other sites More sharing options...
joe Posted October 26, 2004 Report Share Posted October 26, 2004 Welcome to the forum Lucas! Macro Express does not support variable arrays. The Run Macro in Variable command is used to run macro string(s) placed into it, which is usually only done if you are generating dynamic macros. Quote Link to comment Share on other sites More sharing options...
Linda Posted November 2, 2004 Report Share Posted November 2, 2004 A while back, someone posted code about how you could simulate arrays with a trick that used the "Run Macro in Variable" command. Perhaps that is what the poster is looking for? I'll do a quick search, and see if I can find the post. Quote Link to comment Share on other sites More sharing options...
Linda Posted November 2, 2004 Report Share Posted November 2, 2004 Ah, here's the thread, with Floyd's solution: http://pgmacros.com/community/index.php?showtopic=118 Quote Link to comment Share on other sites More sharing options...
Lucas Posted November 3, 2004 Author Report Share Posted November 3, 2004 Thank you for reply. The trick doesn't work me. can you sendme any examples? create array, write array... Thank you in advance. Quote Link to comment Share on other sites More sharing options...
randallc Posted January 13, 2005 Report Share Posted January 13, 2005 Hi, I am also interested in using arrays in ME. I note Floyd has written about “RuninMacro” for this, and now .vbs script for sorting arrays. I am finding it difficult to set up simple arrays so far. Joe also comments on There are no arrays in Macro Express, but a linear sequence of variable numbers can be stepped through like an array. The following code stuffs string variables T1 through T99 with values from the Registry. The multiple choice menu attached really only needs to use cases "C" and "D" in the macro to use your own arrays. Has anyone a simpler way? Array name stored in %ArrayCurrent% as environment variable. Array item (eg) 10 can be retreived from environment variable named from "%ArrayCurrent%(10)" (using modify string command) I am not sure of capacity, but have run the example in case "A" with 10,000 small strings; it could be adapted for integers, etc. Clearly not the speed required in the other examples in this thread? - but avoids the more complex "RunInMacro"? The macro really only needs cases "C" and "D" to run,; have others developed anything simpler? Best, Randall Case: C // Set Array String Number to %T2% Variable Set Integer %N1% from Prompt Variable Modify Integer: Convert %N1% to text string %T2% Variable Modify String: Trim %T2% Variable Set String %T10% from Environment Variable // Set Array String %T3% to Env Variable "%ArrayCurrent%(%T2%)" Variable Set String %T3% from Prompt Variable Modify String: Save %T3% to Environment Variable Variable Set String %T20% from Environment Variable Text Box Display: End Case Case: D // Set New Array Name to Environment Variable "ArrayCurrent" Variable Set String %T1% from Prompt Variable Modify String: Save %T1% to Environment Variable End Case ArraySetter.mxe Quote Link to comment Share on other sites More sharing options...
randallc Posted January 13, 2005 Report Share Posted January 13, 2005 I have tried the registry write and read option; even easier to read? eg read a dual- layered array Case: B // Set Array String Number to Display; Example ,ArrayCurrent, number0, 47 Read Registry String: "%ArrayCurrent%(0,47)" Text Box Display: End Case Best, Randall ArraySetterReg.mxe 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.