Worked immediately after this macro line. However, as the macro goes on to subsequent lines that I put something else into the clipboard, the %STRING1% variable changed into the clipboard content without the %STRING1% variable being referenced or re-defined in subsequent lines!
Is this normal or am I missing something again? I need to permanently store different clipboard results into different variables. How can it be done?
Defining the %string% as %clipboard% sets the variable permanently to %clipboard%. Note the screenshot above.
The %integer1% variable in your example will hold the value, if %clipboard% is a valid integer, because it is forced at run time from a string to an integer for the variable definition. Something like integer1 = cint(%clipboard%). When clipboard is not a number the conversion will not happen.
I've given this one a really quick look, and at this stage all i can think to make this work is outputting the value to a .mmmacro file and running it at run time on a separate MMM process.
This example needs a bit of work, but something like will get us in the right direction: 1 | RUN ACTION | | | | DEFINE STRING VARIABLE | %STRING%::%string% 2 | RUN ACTION | | | | RUN VIA CMD /C | echo 1 ^| RUN ACTION ^| ^| ^| ^| DEFINE STRING VARIABLE ^| %STRING%::%clipboard%>c:\temp\mmmout.mmmacro 3 | IF | FILE | C:\temp\mmmout.mmmacro | EXIST | CONTINUE 4 | RUN ACTION | | | | RUN VIA CMD /C | C:\temp\MiniMouseMacro.exe /e /d:1000 c:\temp\mmmout.mmmacro 5 | RUN ACTION | | | | WAIT SECONDS | 5 6 | RUN ACTION | | | | MESSAGE PROMPT | Value: %string%::clip
I need to do some more work on IO control with stdin and stdout.
Thank you so much Steve for the explanation. Perhaps I try to limit myself to Integer variables for now and only use one string variable ie clipboard to store 1 string and "parse" the string using multiple "backspace"s LOL!
Thanks for demonstrating how a separate MMM process can be run and it may become handy in the future.
Despite some small limitations, I still think MMM is one of the best and most powerful MACRO tool out there! I am still scratching the surface here and would love to explore and learn more about the NetWork tool as I don't know anything about Networking. Wow, there is a Network packet monitor too! It is working but I have no idea what packet strings/text to look for etc.
Thanks Steve once again for making this wonderful tool available to the public! Highly appreciated!