|
Post by cyberchipz on Feb 9, 2020 16:37:51 GMT
OK, I found in this forum, under the LEAP YEAR post, a question which uses the INPUT BOX, that answers my first question; but one of the things I'm looking for is a list of all the RUN ACTIONS that are available. If I'd been able to find a list of these I could have used that information. I found the RUN ACTION command, but there is no list of ACTIONS. I like that the IF command allows one to build actions, I can figure things out from that, as there's a list of options in each selection box when creating an IF command; however I find no such aid for creating a RUN ACTION, so looked for a list of these and couldn't find it.
I can use the input box perhaps, I will try. Below is my first post, this is an edit and if there's any question that I asked you might address, I'd appreciate the help. Mostly I'm just looking for a comprehensive programming or coding language reference to everything MMMPro can do; a grammar and syntax guide. so to speak...
For reference, this was what I originally wrote:
I would like to simply be able to input a number. I am creating a custom loop, or make a calculation from the number input (I want to calculate time before keypress and a loop count). It may be 1 to 3 digits, or text. Can I convert a string to text? Can we call an input box which takes a return to input the value, like TXTBOX (variable = text, or variable = convert string to integer(%string%), or something like that? Or could you direct me to information on the website for handling input and conversions?
Since I don't know how long the input will be, ex: number of characters from keypress, detecting the return chr(13) or some such and building input into a single number would work. I could just prompt for numeric or alpha, which would be fine so no conversion is needed (but is it possible). I noticed that one of your examples uses a file to save input, is that needed? I've coded for over 50 years, just trying to get a basic grasp of what can and can't be done using MMM with respect to user input. Thanks for your help!
|
|
|
Post by zeak on Feb 9, 2020 21:41:53 GMT
Hi Cyberchipz, Welcome to the forum. Unfortunately all I can help you with is the webpage that shows all the things you can do with default use. www.turnssoft.com/conditions.html
|
|
|
Post by Steve on Feb 10, 2020 5:54:02 GMT
Hi Cyberchipz, OK, I found in this forum, under the LEAP YEAR post, a question which uses the INPUT BOX, that answers my first question; but one of the things I'm looking for is a list of all the RUN ACTIONS that are available. If I'd been able to find a list of these I could have used that information. I found the RUN ACTION command, but there is no list of ACTIONS. I like that the IF command allows one to build actions, I can figure things out from that, as there's a list of options in each selection box when creating an IF command; however I find no such aid for creating a RUN ACTION, so looked for a list of these and couldn't find it. The gif below might be able to help out with the first question. Take of note of using the 'Add Condition' page to build conditions in conjunction with zeak 's suggestion of www.turnssoft.com/conditions.html. The graphic illustrates some of the basic scripting and condition use.
I can use the input box perhaps, I will try. Below is my first post, this is an edit and if there's any question that I asked you might address, I'd appreciate the help. Mostly I'm just looking for a comprehensive programming or coding language reference to everything MMMPro can do; a grammar and syntax guide. so to speak... Best bet is to checkout this forum. The search function on the forum is surprisingly good. Try search for gif ( minimousemacro.proboards.com/board/3/help?q=.gif) to or check out this raw archive here. Yeah, but can it handle *any* math functions... I'm trying to add two integers and not having success... 3 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER4%::+%INTEGER1%+%INTEGER2% not even this is working... simple addition. it only adds into %INTEGER4% the value of %INTEGER1%... I suppose I can do it on two lines... adding to Integer4%::+%INTEGER2% ... tedious. So you've probably figured out with your background that MMM applies scripting concepts but is not a comprehensive language. Some of the scripting concepts we take advantage of in languages like python or scripting with powershell are just not possible here. BUT that doesn't mean they can't be added. A lot (i'd say 99%) of the development comes from suggestions on this forum. MMM is good as a tool to graphically create macro's that can take queues from the local environment with some basic scripting functionality. Hope this helps.
|
|
|
Post by cyberchipz on Feb 15, 2020 9:18:18 GMT
I was just thinking, that while 3 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER4%::+%INTEGER1%+%INTEGER2% DID NOT WORK, you might extend MMM math functions by a simple concept... Since you use :: as a delimiter between parameters this might allow you to code a fairly quick modification to allow extended math functions.
3 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER4%::+%INTEGER1%::+2::*1000+%INTEGER2% which by simple looping in the right place, could allow MMM to continue math operations. This would be a simple math, in the order precedence would be... it does them in the order discovered to the originally defined variable. Interpreting each operation, then doing it. So this would be interpreted.
+%INTEGER4%::+%INTEGER1% (Naturally), but then parse and reiterate +%INTEGER4%::+2, now adding 2 to %INTEGER4% the DEFINED INTEGER VARIABLE, then parse/reiterate %INTEGER4%::*100, parse reiterate %INTEGER4%::+%INTEGER2% ad nauseum but setting a limit, or none if wanted or needed. You might need, or want a delimiter like a pipe to indicate that there were no more, but the CR/LF could also work.
The coder would determine operator precedent on math operations in how it was written. No parsing and reparsing in order to determine the order of operations. This sticks with the basic concept of KISS, keeping it SIMPLE. More complex math would require additional lines of code.
BTW I would also suggest adding an option to change the background color?! (pretty please). I too code for pleasure, being retired and all...
*** Mindless reminiscing beyond this point... Can ignore... ***
In the days... my preference and first love was BASIC, and my second would have to be C++ as it was my true 2nd language. I always tried to stay close to the machine. Which if I'm honest, my first language was AUTOCODE, which was a paper coding language (bleech!), then APL (now defunct), then BASIC, COBOL, Fortran, TURBO, 8086 Machine Language, then C and C++. I miss the simpler days.. and MMM reminds me of those days. I look forward to messing around with the PROCESS actions.
For fun, in the between years... when I had my own Computer Shop; I provided services for small businesses. Networking, Building Machines and Networks, whatever I could find. In my spare time (days the storms didn't bring me new customers, and my existing customers didn't have issues, I would track down and hunt Spammers and foreign spoofers who tried to steal credit cards. That got me into security... a lot! lol As retaliation was a given. The stories I could tell. :-)
My first, solo coding for fun, was my first computer, a Commodore 64! It used an 8086 chip, and was a lot of fun. I knew NORTON at one point; but I'm sure he's long forgotten me... I didn't like him much... for those of us who were first to decode MSDOS (I was one), we would decode the OS, and with a newsletter, no Bulletin Boards or eMail in those days, we'd decode the processes in the OS, and memory locations (things were more stable then) where they were stored, the parameters needed, and document them. So, I was one of the volunteer MSDOS documenters... NORTON took those newsletters and published them in a book, and sold it back to us... We were furious. That's why I don't much care for him; He never looked back, and parlayed that into a thriving profession.
Well, I've gone on for a bit; better quit before I get a TLDR or wall of text complaint! lol I want to add by way of a complement again how much I appreciate your little piece of work MMM. When I was in need many years ago; it did what I needed, and got lost in an upgrade. When I was searching again for a Mouse and Keyboard MACRO builder, you were in a top 10 list online... I saw it, and literally let out a squeal of delight. Most of the them just captured and played back mouse clicks. They all were free or shareware. I skimmed them. You were the first one mentioned... and I didn't need to look further. As you can see by my "wall of text" I'm a prolific typist. Years of coding did that. I learned to type when I was 12, and I love being able to touch type any code or symbol on the keyboard. So the pipe | works as a delimiter for me... I already knew it.
Shutting down the wall... for now. L8r)
|
|
|
Post by Steve on Feb 17, 2020 9:08:34 GMT
I was just thinking, that while 3 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER4%::+%INTEGER1%+%INTEGER2% DID NOT WORK, you might extend MMM math functions by a simple concept... Since you use :: as a delimiter between parameters this might allow you to code a fairly quick modification to allow extended math functions. Yes - i like this. This is a quick win and I will defiantly look at this for the next update. Thank you Chip
|
|