- 积分
- 531
- 兑换点
- 点
- 声望度
-
- 金钱
- 元
- 银行存款
- 元
- 贡献度
-
- 精华
|
本帖最后由 zfaidz 于 2016-8-29 20:35 编辑
如果你不打算写脚本,那么下面的东西你不用看了。
通过正面的脚本,可以得到按钮或者菜单的属性信息,包括标题、描述、图像文件名等等。
文件1 ProcessInfo.pas
- Interface
- Type
- TForm = Class
- RichEdit : TRichEdit;
- Edit : TEdit;
- Button : TButton;
- End;
- Var
- TForm1 : TForm;
- procedure TForm1.ButtonClick(Sender: TObject);
- Var
- guiManager : IGUIManager;
- processInfo : IProcessLauncherInfo;
- imgFile : WideString;
- begin
- If Edit.Text = \\\'\\\' Then Edit.Text := \\\'Sch:PlacePort\\\';
- guiManager := Client.GUIManager;
- processInfo := guiManager.GetActivePLByCommand(\\\'SCH\\\',Edit.Text,\\\'\\\');
- imgFile := processInfo.GetImageFile;
- RichEdit.Text := \\\'Process: \\\' + Edit.Text + + #13 +
- \\\'Caption: \\\' + processInfo.GetCaption + #13 +
- \\\'Description: \\\' + processInfo.GetDescription + #13 +
- \\\'Image File: \\\' + imgFile;
- end;
- procedure TForm1.Form1Create(Sender: TObject);
- begin
- RichEdit.Text := \\\'\\\';
- end;
复制代码 文件2 ProcessInfo.dfm
- object Form1: TForm1
- Left = 0
- Top = 0
- BorderStyle = bsDialog
- Caption = \\\'Form1\\\'
- ClientHeight = 240
- ClientWidth = 640
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = \\\'Tahoma\\\'
- Font.Style = []
- OldCreateOrder = False
- Position = poScreenCenter
- OnCreate = Form1Create
- PixelsPerInch = 96
- TextHeight = 13
- object RichEdit: TRichEdit
- Left = 5
- Top = 8
- Width = 627
- Height = 184
- Font.Charset = GB2312_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = \\\'Tahoma\\\'
- Font.Style = []
- Lines.Strings = (
- \\\'RichEdit\\\')
- ParentFont = False
- TabOrder = 0
- end
- object Edit: TEdit
- Left = 5
- Top = 207
- Width = 539
- Height = 21
- TabOrder = 1
- end
- object Button: TButton
- Left = 548
- Top = 204
- Width = 75
- Height = 25
- Caption = \\\'Get\\\'
- TabOrder = 2
- OnClick = ButtonClick
- end
- end
复制代码
|
|