Macro question
Loopysue
ProFantasy 🖼️ 40 images Cartographer
How do you incorporate/install/add/introduce a macro that someone else has written to your CC3+?
Little tiny baby steps please - I really don't seem to be able to get this through my head even though I've read the written tutorials on this several times over.
Even better - is there a video on how to do it? I have autism, and I generally learn things about 10x faster if I can watch someone else do it first.
Little tiny baby steps please - I really don't seem to be able to get this through my head even though I've read the written tutorials on this several times over.
Even better - is there a video on how to do it? I have autism, and I generally learn things about 10x faster if I can watch someone else do it first.
Comments
1)
Put the entire macro in a plain text file, and name it whatever you want, but with the file extension .mac (for te sace of example, let us refer to it as mymacros.mac) and put it in the CC3+ data directory.
Now, inside CC3+ you can load that macro file by typing this command on the command line
LOADMAC mymacros.mac
Now, all the macros in that file will be available to you. When you are done, you need to reload the default macro file with the command
LOADMAC fcw32.mac
2)
Simply edit the default macro file, fcw32.mac instead, and put your macro in there. This saves you from having to keep loading the macro file and reloading the default one afterwards, but since this is the default macro file, it is also important that you don't mess it up, so create a backup before editing it.
The file is found in the CC3+ data directory, and can either be edited with a standard text editor (like notepad), or you can edit it from inside CC3+ by going to Tools --> Macros --> Edit Macros.
So once I've set up a way to open Notepad by somehow adding it to either my Start menu or my toolbar (the way I do it now is right click in a folder and tell it to create a new txt file, and then double click the txt file)... and I find and open the default macro, fcw32.mac, what are the rules? I mean - what does a macro start and end with, and is there a right and wrong order?
I am so sorry - all these questions are probably answered in your latest tutorial blog, but I have a reading comprehension problem I've decided to finally admit to. It makes me feel really stupid at times, but I only understand a written article if I already know what its talking about. It sounds perfectly mad, I know, but that's how my brain works - for me, written instructions are easy to give because I'm writing about what I already know, but I can't understand stuff I don't already know and understand very well.
MACRO macroname
where macroname is the name of the macro, what you would type on the CC3+ command line to call it.
The macro must also end with
ENDM
Leave one blank line between the end of one macro and the next, and the last line in the file should be a blank one, but otherwise, don't put blank lines in a macro files.
All the lines between the MACRO and ENDM lines are just regular CC3+ commands, such as this simple macro
MACRO drawline
LINE 0,0 1000,1000
ENDM
I really need this tiny nibble size help. I didn't understand before, but it seem to me that a macro is a very simple piece of code with high level commands that are more or less in English words rather than long strings of hex numbers and syntax?
Sort of a bit like the old BASIC language, but closer to straight English?
If you look in the Tome (I recommend the new update released a few days ago), in Appendix A of most chapters, there is a list of all CC3+ commands, and their text equivalents, which describes how each command is used in a macro.
I think you have given me the key to the door I needed to open before any of it made sense to me.
I will download the new Tome and start to have a read of all these new things you have unlocked for me.
I did a short intro to macros in this Command of the Week article, you may wish to have a look at it.
I will also have a look at that article again. I say again because I am more than likely to have read it before, but the last time I read it the words might have made sense individually while the meaning of each phrase must have gone right over my head. I lacked the key to understand it before now
On reading the first part of your Command of the Week article I saw that any macro I wrote or pasted into the default file might be overwritten every time there was an update to CC3+. I don't need to know how to do this yet (because I'd only get confused all over again), but would it be possible to switch between the default macro file and mymacros.mac by making a toggle button? A button that tells the system to look at what is loaded and switch to B if A is loaded, or to A if B is loaded. Can we make buttons that toggle things like that? It just occurred to me that if you could do that then you wouldn't have to keep messing around constantly updating the default macro file if you could switch from one to the other at any time by just clicking a button.
Please don't tell me how to make a button yet. I'd probably have a stroke or something trying to understand it all. I'd just like to know if that is a possibility - a future goal.
Thank you
A script file is like a macro file, except that it only contains a single macro that are run immediately upon calling it, the file extension is .scr, and it is just a list of commands, it doesn't contain the starting and ending MACRO and ENDM commands a macro does, but otherwise there is no difference between putting the commands in a script file vs a macro.
Are script files faster than macros - more lightweight on the system?
I'm aiming more to make it possible to switch between the default macro file and my own personal one without having to down tools completely to type commands. I thought that clicking a button would be easier and faster. I'm leaning towards doing a separate .mac file of my own so that I don't have to worry about modifying the default file or having to set everything up all over again every time there's an update.
Now that Remy has so kindly explained macros in terms I can understand I think I will be ok. I just need to finish the artwork for an annual first, and then I can have a play with it all.
I have a clear plan of what I want to do now.
I will set up my own macro file and collect or write the macros I want in it, then at some point in the future I will ask how to make buttons.
There is no real difference between scripts and macros, except that a macro has a name and can be called with a command from the command line, while a script needs to be loaded (using SCRIPT/SCRIPTM) and it is being run immediately upon loading it.
Adding hotspots to a map (and/or a template) instead of using toolbar buttons is always a good idea if the functions are only meant to be used with that map though.
MULTIFILESCRIPT
command.Two interesting points I recently discovered/realized:
I hope someone finds this useful.