First of all, I'm not sure, that is possible to run a macro from config.pro. This method is working fine, for example
proESession.RunMacro("mapkey $F2 ~ Activate `main_dlg_cur` `page_Review_control_btn` 1;"+
"mapkey(continued) ~ Activate `main_dlg_cur` `Review:ProCmdDwgRegenDraft`;"+
"mapkey(continued) ~ Activate `main_dlg_cur` `page_Tools_control_btn` 1;");
Working code:
--------------------------------------------------------------
Model Doc3D;
SelectionBuffer selectionBuffer;
Session session = pfcGlobal.GetProESession();
selectionBuffer = session.GetCurrentSelectionBuffer();
Doc3D = session.GetCurrentModel();
ModelItems Faces = Doc3D.ListItems(ModelItemType.ITEM_SURFACE);
Selection Sel = pfcSelect.CreateModelItemSelection(Faces.get(1), null);
selectionBuffer.AddSelection(Sel);
session.RunMacro("mapkey $F8 ~ Select `main_dlg_cur` `View:ProCmdViewGallery`;"+
"mapkey(continued) ~ Close `main_dlg_cur` `View:ProCmdViewGallery`;"+
"mapkey(continued) ~ Activate `main_dlg_cur` `ProCmdViewGallery_layoutph.appEditorPB`;"+
"mapkey(continued) ~ Activate `pgl_appearance_manager` `ColorButton` 1;"+
"mapkey(continued) ~ Arm `pgl_color_editor` `SBlue`;"+
"mapkey(continued) ~ Update `pgl_color_editor` `SBlue` 100;"+
"mapkey(continued) ~ Disarm `pgl_color_editor` `SBlue` 100;~ Arm `pgl_color_editor` `SGreen`;"+
"mapkey(continued) ~ Update `pgl_color_editor` `SGreen` 0;"+
"mapkey(continued) ~ Disarm `pgl_color_editor` `SGreen` 0;~ Arm `pgl_color_editor` `SRed`;"+
"mapkey(continued) ~ Update `pgl_color_editor` `SRed` 0;~ Disarm `pgl_color_editor` `SRed` 0;"+
"mapkey(continued) ~ Activate `pgl_color_editor` `StdOk`;"+
"mapkey(continued) ~ FocusOut `pgl_appearance_manager` `AppearanceName`;"+
"mapkey(continued) ~ Activate `pgl_appearance_manager` `stdOk`;");
--------------------------------------------------------------
In the example, will change the color only ONE face of the part. I don't like a flashing window. Need to play with a macro.