A few corrections that could be made to the plugin/inline function documentation:
InternalID() – returns a nullable Guid (Guid?) that indicates the internal id specified by the
profile author.
Guid? commandId = vaProxy.Command. InternalID();
if (commandId.HasValue) //if the internal id was indicated
{
//do something with the ID here
}
Has a space between "Command." and "InternalID();"
Exists(string CommandName) – This Boolean function returns true if a command is
available to the active profile with the name specified in CommandName.
if (vaProxy.CommandExists(“fire weapons”))
{
vaProxy.ExecuteCommand(“fire weapons”);
}
Uses the old methods, rather than the new sub-class ones
Active(string CommandName) - This Boolean function returns true if the command
indicated by name in CommandName is actively executing (most likely long-running or
running in a loop).
if (vaProxy.CommandActive(“fire weapons”) == false) //if command not active
{
vaProxy.ExecuteCommand(“fire weapons”); //execute the command
}
Uses the old methods, rather than the new sub-class ones
Example for inline function usage:
public void main()
{
VA.ProfileChanging += MyProfileChangingAction;
}
public void MyProfileChangingAction(Guid? currentID, Guid? loadingID,
String currentName, String loadingName)
{
VA.WriteToLog("Profile changing to " + loadingName, "orange");
}
"+ loadingName" is erroneously highlighted in red (the snippet for plugin usage right below it does highlight the syntax correctly).
public void main()
{
VA.ProfileChanged += MyProfileChangedAction;
}
public void MyProfileChangedAction(Guid? previousID, Guid? currentID
String previosName, String currentName)
{
VA.WriteToLog("Profile changed to " + currentName, "orange");
}
"previosName" is a typo
"+ currentName" is erroneously highlighted in red (the snippet for plugin usage right below it does highlight the syntax correctly).
Example for inline function usage:
public void main()
{
VA.ApplicationFocusChanged += MyApplicationFocusChangedAction;
}
public void MyApplicationFocusChangedAction(Process pFocus, String title)
{
VA.WriteToLog(title + " - " + pFocus.ProcessName , "orange");
}
"+ pFocus.ProcessName" is erroneously highlighted in red (the snippet for plugin usage right below it does highlight the syntax correctly).
There is also a space between "ProcessName" and "," that isn't there in the plugin example
EDIT: All corrected.