private List GetActionList(ps._Application app, string setName) { int index = 1; List result = new List(); int gClassActionSet = app.CharIDToTypeID("ASet"); int gClassAction = app.CharIDToTypeID("Actn"); int gKeyName = app.CharIDToTypeID("Nm "); int gKeyNumberOfChildren = app.CharIDToTypeID("NmbC"); while (true) { ps.ActionReference ref_ = new ps.ActionReference(); ref_.PutIndex(gClassActionSet, index); ps.ActionDescriptor desc = null; try { desc = app.ExecuteActionGet(ref_); } catch { break; } if (setName == String.Empty) { if (desc.HasKey(gKeyName)) result.Add(desc.GetString(gKeyName)); } else { if (desc.GetString(gKeyName) == setName) { int numberChildren = 0; if (desc.HasKey(gKeyNumberOfChildren)) numberChildren = desc.GetInteger(gKeyNumberOfChildren); if (numberChildren > 0) { for (int i = 1; i <= numberChildren; i++) { ps.ActionReference ref__ = new ps.ActionReference(); ref__.PutIndex(gClassAction, i); ref__.PutIndex(gClassActionSet, index); ps.ActionDescriptor desc_ = null; desc_ = app.ExecuteActionGet(ref__); if (desc_.HasKey(gKeyName)) result.Add(desc_.GetString(gKeyName)); } break; } } } index++; } return result; }