Just add this one custom macro method and you can call all the static methods you want.
///Put this in the RegisterMethids block
MacroMethods.RegisterMethod("InvokeStaticMethod", InvokeStaticMethod, typeof(string), "returns result of static method call.", null, 2, new object[,] { { "type", typeof(int), "The fully qualified type name of the object" }, { "methodName", typeof(int), "The Name of the method to call" }}, null);
//put this outside of the RegisterMethods block
public static object InvokeStaticMethod(params object[] parameters)
{
if (parameters.Length >= 2)
{
Type t = Type.GetType(parameters[0].ToString());
System.Reflection.MethodInfo method = t.GetMethod(parameters[1].ToString(), System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public);
return method.Invoke(null, parameters.Skip(2).ToArray());
}
return null;
}
You can change the names around if you want, but I just tested it and it works.