有何高人给个厉害的ai-rcj机器人代码

泛旅传媒 2022-05-01 14:29 编辑:元若 261阅读

procedure TForm1.Button1Click(Sender: TObject);
var
 lphKey: HKEY;
 sKeyName: string;
 sKeyValue: string;
begin
 sKeyName := 'myfile';
 sKeyValue := '我的文档';
 RegCreateKey(HKEY—CLASSES—ROOT, pchar(sKeyName), lphKey);
 RegSetValue(lphKey, '', REG—SZ, pchar(sKeyValue), 0);
 sKeyName := '.xyz';
 sKeyValue := 'myfile';
 RegCreateKey(HKEY—CLASSES—ROOT, pchar(sKeyName), lphKey);
 RegSetValue(lphKey, '', REG—SZ, pchar(sKeyValue), 0);
 sKeyName := 'myfile';
 sKeyValue := 'c:\Windows\NotePad.exe %1';
 RegCreateKey(HKEY—CLASSES—ROOT, pchar(sKeyName), lphKey);
 RegSetValue(lphKey, 'shell\open\command', REG—SZ, pchar(sKeyValue), MAX—PATH);
end;