Here for you to use, if you so wish, is my example "EDDI Take command" VA profile.
Note that this command uses the EDDI Plugin and will not work without it installed.
This is one software developer's (my) take on how VA commands should be structured and although it looks over complicated, in reality it make things easier to maintain and extend.
There are 13 commands in the profile as follows:
Disable quet mode
Enable quiet mode
Full reset immediate
Profile startup
Quick ship status
Say disable quiet mode
Say enable quiet mode
Say good afternoon
Say good evening
Say good morning
Say text
Take command
Welcome commander
When imported in to VA, the 'Profile startup' command should be set to run when the profile is first loaded. This sets some variables and calls the EDDI start command.
There are two variables in this profile quiet_mode which is initially set to zero and use_eddi_for_say which is initially set to 1.
One major point to note. Most of the outputs, that is the commands that output text to the TTS engine are separate commands and start with 'Say' (except 'Say text'). These commands set up a string which is passed to the 'Say text' command. This command is the only command that outputs the text as words. However, if quite_mode is 1 then nothing is output.
Also you can choose to have EDDI output the words or the default TTS engine depending on the setting of use_eddi_for_say.
You will also notice that all the commands are disabled except 'Disable quiet mode', 'Enable quiet mode', 'Full reset immediate' and 'Take command'. The disabled commands are only called from other commands.
In effect the profile has been separated into the input commands that trigger actions (the enabled commands), the logic such as 'Quick Ship Status' and 'Welcome', the output set up commands, which are the 'Say' commands except 'Say text' and the output command which is 'Say text'
Why do it this way? The answer to that is simple. Imagine having say statements in all your commands and then you wanted the option to have a quite mode. You would have to add the quiet mode check to all the commands that had a 'say'. In the commands in this profile, all the outputs go through one command 'Say text' and it is easy to add the quite mode in the one place as I have done, which you can see from the command.
You may also want to call some of the commands in other places. My own profile calls 'Full reset immediate' in more than one place and if I had the variable set commands in the start up profile I would either have to call the 'Prefile startup' command instead with possibly unpredictable results or I would have to duplicate the variable setup and if there's one thing a programmer hates it's duplication.
In my own profile I also have the key bindings as separate, disabled VA commands which are called from other VA commands as appropriate. Again this prevent duplication and if you should change your key binding in Elite, then there is only one place to change the key binding in VA.
If you have any questions or constructive comments then do not hesitate to post.
The profile may be downloaded from
http://markausten.co.uk/files/eddi/eddi-take-command-profile.vap.