Macro Creator (feedback wanted)

For general Flowcode discussion that does not belong in the other sections.
stefan.erni
Valued Contributor
Posts: 798
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 157 times
Been thanked: 185 times

Re: Macro Creator (feedback wanted)

Post by stefan.erni »

Hi Martin

It's working very nice!
Can you program the blue text "www.flowcodexchange.com"
as a link?
I am interested in what happens next.
regards and thanks a lot

Stefan

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: Macro Creator (feedback wanted)

Post by p.erasmus »

Martin

Very nice :D :D :D
Regards Peter - QME Electronics

mnfisher
Valued Contributor
Posts: 1041
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 107 times
Been thanked: 538 times

Re: Macro Creator (feedback wanted)

Post by mnfisher »

Thanks Stefan and Peter,

So this is the final version (for now!)

There are a few changes...
clicking on flowcodexchange now opens edge on the page. (for Stefan!)
Clicking on the coffeecup links to the buymeacoffee page (for Me :D )

It will now either add to a file (click add to) or to a template (imaginatively named template.fcfx) which needs to be in the same directory. I expect users to save their own 'template' here (favourite MCU etc). Just clicking 'Save As' adds to template.fcfx thus creating a new project.

I've added a 'parameters' field. Add any required parameters for the macros using the format 'type name, type2 name2 ... typen namen' Arrays are supported using '[' and ']' (size is also needed for strings but not in return values). Parameters are comma separated and type can be bool or boolean, float or real, int, uint, byte, long, ulong, string or handle as before)

So a possible entry in Parameters would be 'byte number, ulong values[10], string str[20]' (without the quotes) which would add 3 parameters (number, values and str) to a macro.

There is (absolutely) no error checking - so adding something like byte x[2v] probably won't cause a crash - but won't give the 'expected' result either.

In retrospect - I probably should have had one column per parameter. However - as it is currently would allow 'locals' to be added very simply.
FC__00052.jpg
FC__00052.jpg (43.95 KiB) Viewed 2051 times
Would create four macros (Test and Scroll marked as downloadable and TestSim and ScrollSim as their simulation counterparts) Note that the simulation names do not have to end with 'Sim' but do by convention.
TopDown.zip
(2.99 MiB) Downloaded 132 times
Martin

mnfisher
Valued Contributor
Posts: 1041
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 107 times
Been thanked: 538 times

Re: Macro Creator (feedback wanted)

Post by mnfisher »

Having said it was a final version...

I added a clear, load and save macro list function.. This 'works' but loading the macro list slightly messes with the layout of the grid (highlighting of column names and line numbers goes and column widths are reset) - however it save the macro list as a user editable list so it 'might' be useful?

I could reset these visual glitches - but it would be a lot more code than needed to actually load and save the file - so I won't bother unless anyone thinks it would be useful?
TopDown.zip
(2.99 MiB) Downloaded 130 times
Martin

Post Reply