PDA

View Full Version : Usercommand macro generator



pedja089
- 2nd August 2015, 02:03
I was playing first time with USERCOMMAND today.
And there are great extension, but they require a lot of typing if you want to support all variable types.
For usercommand with 1 input variable you need minimum 4 macros(each for bit, byte, word, and constant), if you have 2 inputs in your command, then you need 16.
If you are using long, then 25 macros just for 2 inputs, 3 input 125 macros. And that is too much...
So I created little App in VS2012 to do hard work...
I just finished it and just give it quick test. Should be fine, but use at own risk!
Screenshot:
7960
Here is project:
7961
If you want to use just .exe path is "...Archive\UserCommand\bin\Release\UserCommand.exe"
Requires at least .NET Framework 2.0.

pedja089
- 2nd August 2015, 02:14
PBP Demo Project:
7962

HenrikOlsson
- 2nd August 2015, 07:43
Hi,
I've never used the usercommand stuff myself but have seen, from Darrel and now Richard with his graphical LCD driver, that it can be very useful. Thank you for doing this and for sharing it!

/Henrik.

richard
- 2nd August 2015, 10:46
usercommand :- i'm hooked on it now I understand a bit more about proper use of the macros.

if you could have


z = usercmd x, y

I think I would be happy to give xc8 and mikroc the flick .

what you have there pedja089 will save heaps of typing and my inevitably cut and paste mess ups , good job

pedja089
- 2nd August 2015, 11:33
That would be very nice, but non of picbasic command gave that syntax. So that syntax isn't option. For now, i hope.
But you always can put output variable in your command. And use it that way. As you use every other basic command, like lookup, serin, etc...
And there is new idea for App, to add output variables to usercommand.

stanon1
- 3rd August 2015, 21:05
merely looking at the screenshot, i already see the usefullness of this app. well done