Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program tmpyn;
- uses SysUtils,Keyboard;
- function Ask(FilePath:UnicodeString):boolean;
- var K: TKeyEvent;
- KS:String;
- begin
- WriteLn ('File ', FilePath, ' is exists! Replace file? [Y/N]');
- InitKeyBoard;
- while true do begin
- K:=GetKeyEvent;
- K:=TranslateKeyEvent(K);
- KS:=KeyEventToString(K);
- if (KS='Y') or (KS='y') then begin DoneKeyBoard; exit(true); end;
- if (KS='N') or (KS='n') then begin DoneKeyBoard; exit(false); end;
- end;
- DoneKeyBoard;
- exit(false);
- end;
- BEGIN
- WriteLn(Ask('C:\Temp\777'));
- Readln;
- END.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement