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
Macro Creator (feedback wanted)
-
- Valued Contributor
- Posts: 997
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 190 times
- Been thanked: 217 times
-
- Valued Contributor
- Posts: 1453
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 135 times
- Been thanked: 707 times
Re: Macro Creator (feedback wanted)
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
)
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.
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.
Martin
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

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.
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.
Martin
-
- Valued Contributor
- Posts: 1453
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 135 times
- Been thanked: 707 times
Re: Macro Creator (feedback wanted)
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?
Martin
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?
Martin