当前位置: 首页>>代码示例>>C++>>正文


C++ PluginStartupInfo::MacroControl方法代码示例

本文整理汇总了C++中PluginStartupInfo::MacroControl方法的典型用法代码示例。如果您正苦于以下问题:C++ PluginStartupInfo::MacroControl方法的具体用法?C++ PluginStartupInfo::MacroControl怎么用?C++ PluginStartupInfo::MacroControl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PluginStartupInfo的用法示例。


在下文中一共展示了PluginStartupInfo::MacroControl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ProcessSynchroEventW

intptr_t WINAPI ProcessSynchroEventW(const struct ProcessSynchroEventInfo *Info)
{
	if (Info->Event != SE_COMMONSYNCHRO)
		return 0;
	if (gnInCall > 0)
		return 0;
#if 1
	OutputDebugString(L"Posting macro\n");
	MacroSendMacroText mcr = {sizeof(MacroSendMacroText)};
	//mcr.SequenceText = L"i = 0; if APanel.Plugin then i=i+1; end; if PPanel.Plugin then i=i+2; end; Plugin.Call(\"6197AF6C-4755-49A5-84A1-8F227BF4790E\",i)";
	mcr.SequenceText = L"Plugin.Call(\"6197AF6C-4755-49A5-84A1-8F227BF4790E\",APanel.Plugin and \"\" or APanel.Path0,PPanel.Plugin and \"\" or PPanel.Path0)";
	INT_PTR i = psi.MacroControl(&guid_PluginGuid, MCTL_SENDSTRING, MSSC_POST, &mcr);
	MacroParseResult* mpr;
	if (!i)
	{
		mpr = (MacroParseResult*)calloc(4096,1);
		mpr->StructSize = sizeof(*mpr);
		psi.MacroControl(&guid_PluginGuid, MCTL_GETLASTERROR, 4096, mpr);
		free(mpr);
	}
	else
		InterlockedIncrement(&gnInCall);
#endif
#if 0
	wchar_t szDbg[100];
	static LONG nCount; nCount++;
	wsprintf(szDbg, L"%i: PanelControl(FCTL_GETPANELINFO, PANEL_ACTIVE)...", nCount);
	PanelInfo piA = {sizeof(piA)}, piP = {sizeof(piP)};
	INT_PTR nARc = psi.PanelControl(PANEL_ACTIVE, FCTL_GETPANELINFO, 0, &piA);
	OutputDebugString(L" and PANEL_PASSIVE...");
	INT_PTR nPRc = psi.PanelControl(PANEL_PASSIVE, FCTL_GETPANELINFO, 0, &piP);
	OutputDebugString(L" Done\n");
#endif
	return 0;
}
开发者ID:Maximus5,项目名称:FarPlugins,代码行数:35,代码来源:SyncPoll.cpp

示例2: RunKey

static void RunKey(const wchar_t* Key)
{
  MacroSendMacroText macro;
  memset(&macro,0,sizeof(macro));
  macro.StructSize=sizeof(MacroSendMacroText);
  macro.SequenceText=Key;
  Info.MacroControl(&MainGuid,MCTL_SENDSTRING,MSSC_POST,&macro);
}
开发者ID:Maximus5,项目名称:evil-programmers,代码行数:8,代码来源:farmine.cpp

示例3: OpenW

/**
  Open plugin configuration of actions dialog.
*/
HANDLE WINAPI OpenW(const struct OpenInfo *oInfo)
{
  switch (oInfo->OpenFrom) {
    case OPEN_EDITOR:
      editorSet->openMenu();
      break;
    case OPEN_COMMANDLINE:
      {
		OpenCommandLineInfo *ocli =(OpenCommandLineInfo*)oInfo->Data;
        //file name, which we received
        const wchar_t *file = ocli->CommandLine;

        wchar_t *nfile = PathToFull(file,true);
        if (nfile){
          if (!editorSet){
            editorSet = new FarEditorSet();
          }
          editorSet->viewFile(DString(nfile));
        }

        delete[] nfile;
      }
      break;
    case OPEN_FROMMACRO:
      {
        Info.MacroControl(&MainGuid, MCTL_GETAREA, 0, NULL);
        OpenMacroInfo* mi=(OpenMacroInfo*)oInfo->Data;
        int MenuCode=-1;
        if (mi->Count)
        {
          switch (mi->Values[0].Type) {
          case FMVT_INTEGER: MenuCode=(int)mi->Values[0].Integer; break;
          case FMVT_DOUBLE: MenuCode=(int)mi->Values[0].Double; break;
          default: MenuCode = -1;
          }
        }

        if (MenuCode < 0)
          return 0;
        editorSet->openMenu(MenuCode-1);
      }
      break;
  }
  return 0;
};
开发者ID:MarsBlessed,项目名称:FarColorer,代码行数:48,代码来源:pcolorer.cpp


注:本文中的PluginStartupInfo::MacroControl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。