Macros for Dummies

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

Re: Macros for Dummies

Postby ger21 » Fri Oct 13, 2017 10:37 am

I've modified it to use a white background, and added some additional functions. When I get home, I'll see if I can tell you how I did it.
I think the Notepad++ option is better than Visual Studio, for just simple macros, as it's much simpler. Visual Studio probably does a better job of checking for improper syntax, though.
Gerry
UCCNC 2017 Screenset - http://www.thecncwoodworker.com/2017.html
ger21
 
Posts: 1111
Joined: Sat Sep 03, 2016 2:17 am

Re: Macros for Dummies

Postby 1JUMPER10 » Fri Oct 13, 2017 11:48 pm

cncdrive wrote:You should copy the macros in the UCCNC/Profiles/Macro_yourprofile folder, where "yourprofile" means the name of the profile you running. Each profile has it's own folder with it's own macro files.
Then you can call the macro from MDI and g-code file with the macro number, like M1020.

You can also attach macros to buttons on the screen.
Just make a button or copy and existing one with the screen editor and adjust the buttonnumber parameter to the range between 20000 and 21999 and make your macro number also in this range.
This range of macros are dedicated to macro calls from buttons presses.
Then pressing the button will execute the same number of macro as the buttonnumber parameter.


Thank you.
1JUMPER10
 
Posts: 48
Joined: Tue Oct 04, 2016 1:54 am

Re: Macros for Dummies

Postby ger21 » Sat Oct 14, 2017 1:11 am

Greolt wrote:
I did try your plugin for Notepad++ But could not get rid of the black highlighting (you may like a black background but I hate it)


Language > Define Your Language.
On the Folder & Default tab, you'll see Default Style:, and a button that says "Styler". Click the button, and you can change the background Color. In the various tabs, you'll find other "styler" buttons that let you change the colors of everything, if you want.
Gerry
UCCNC 2017 Screenset - http://www.thecncwoodworker.com/2017.html
ger21
 
Posts: 1111
Joined: Sat Sep 03, 2016 2:17 am

Re: Macros for Dummies

Postby Greolt » Sat Oct 14, 2017 8:24 am

Gerry

I had no difficulty changing the black background back to white.

What happened was any text file I opened had a black highlight. (Hard to explain) See pic for mockup example made in Word.

Can I get rid of that?
Attachments
blacktext.jpg
blacktext.jpg (25.05 KiB) Viewed 3867 times
Greolt
 
Posts: 79
Joined: Sun Sep 04, 2016 6:22 am

Re: Macros for Dummies

Postby Robertspark » Sat Oct 14, 2017 8:34 am

I'll be back home in a few hours, basically you need to go through each of the settings and change them to white background and whatever colour text you prefer.

I use a pc for many many hours and white generates eye strain (for me), hence a dark colored is good for me

Do you have a preference on colours, what do you want for text for comments operators and methods?
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2106, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 892
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: Macros for Dummies

Postby Greolt » Sat Oct 14, 2017 8:56 am

Rob

Don't know that matters so much to me. Something along the lines of the existing C# colours would be fine.

When I open the UCCNC Style.XML I see lots of bgColor="FFFFFF" Guessing that is black.

Aware that lots of pro CAD users prefer black backgrounds. Tried it. Find it just too hard.
Greolt
 
Posts: 79
Joined: Sun Sep 04, 2016 6:22 am

Re: Macros for Dummies

Postby Robertspark » Sat Oct 14, 2017 1:15 pm

This should help.... easy solution.... use the style configurator

https://youtu.be/PfefMlZ4pfU
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2106, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 892
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: Macros for Dummies

Postby Greolt » Sun Oct 15, 2017 1:12 am

Thanks for the help

Went in and altered all the style settings (colours) for UCCNC via the STYLER

I think the issue I had earlier may have been an old version of Notepad++. A lot of the settings look different on the latest.
Greolt
 
Posts: 79
Joined: Sun Sep 04, 2016 6:22 am

Re: Macros for Dummies

Postby mim » Wed Sep 12, 2018 12:18 am

where are they stored the customized macros 20000 and up? I didn't find them in the profile folder
mim
 
Posts: 2
Joined: Wed Sep 12, 2018 12:03 am

Re: Macros for Dummies

Postby Robertspark » Wed Sep 12, 2018 3:59 pm

You write them and save them in the profile folder.

save them as M2xxxx.txt files
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2106, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 892
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

PreviousNext

Return to Macros

Who is online

Users browsing this forum: No registered users and 2 guests