Right now, I would love to see a tutorial on how to write a plugin. I saw the examples in the install folder, but C# isnt my first (code) language and didnt really know where to start. When I can get firmly grounded in it, I will have a lot to post probably.
The general requirements for plugin development (the tools needed, what kind of application you have to compile, the functions your interface needs to expose and so on...) are quite well laid out in the PDF help file, starting from page 88.
Note that any .NET language will do, so for example if you , like me, are more familiar with VB.NET than C#, you can have a look at the source code from my stuff to get a rough idea of how you can structure your library... the link is under my avatar on the left, the little globe
Broadly speaking, you need to create a 'Class Library' project in Visual Studio (the free, express, versions are more than capable) and add in a class/module of your choice the 6 static
functions described in the help file.
The bulk of the job is done in the VA_invoke1() functionpublic static void VA_Invoke1(String context,
ref Dictionary<string, object> state,
ref Dictionary<string, Int16?> shortIntValues,
ref Dictionary<string, string> textValues,
ref Dictionary<string, int?> intValues,
ref Dictionary<string, decimal?> decimalValues,
ref Dictionary<string, Boolean?> booleanValues,
ref Dictionary<string, DateTime?> dateTimeValues,
ref Dictionary<string, object> extendedValues)
where the highlighted dictionaries above have direct correspondence to the textboxes you see in this dialog
so whatever values you set in your profile, it will be sent to your plugin code in a key/value pair fashion, for you to evaluate... in the sample image above, the shortIntValues
dictionary will contain one value, with key 'VxIndex
', the textValues
dictionary will have 2 items with 'VxFile
' and 'VxArgs
' key respectively and the other lists will be empty
' is a simple string that is typically used to tell, to a multi-function plugin, which procedure you want to activate.
' is a peculiar dictionary that you can't explicitly populate from the VA profile, but you can instead manipulate from your code... it's different from the other ones in that is persisted by VA and will always be passed back in full at each call, so you can store any support data you might need for subsequent calls
Note that you can't interact directly with the VA responses to the user (by that i mean that you can't, for example, dictate in your code which button to press), so you have to design both your plugin code and your profile accordingly; one will evaluate the conditions and pass back some different conditions, the other will implement the necessary 'if' blocks to trigger the actual input/TTS response/whatever.
I understand this might still be quite confusing, but without a concrete sample, it's harder to explain it than to actualy do it... feel free to ask for more.