Project > View Source. Skift koden ud med følgende, og kør:
program ICQStarter;
uses Windows, SysUtils;
{$APPTYPE CONSOLE}
var Input, Str: String;
begin Writeln('Mok Systems v.1.0'); Str := 'Online ' + DateTimeToStr(Now); Writeln(Str); Writeln; Input := ''; while Input <> 'EXIT' do begin Writeln('>'); Read(Input); Input := UpperCase(Input); if Input = 'ICQ' then begin Writeln('Starting ICQ......'); Shellexecute(Handle, 'OPEN', 'c:\programmer\icq\icq.exe', nil, nil, SW_SHOW); Writeln('ICQ Running!'); end else if Input = 'DELPHI' then begin Writeln('Starting Delphi......'); Shellexecute(Handle, 'OPEN', 'c:\programmer\borland\delphi4\bin\delphi32.exe', nil, nil, SW_SHOW); Writeln('Delphi Running!'); end else if Input <> 'EXIT' then Writeln('Ukendt kommando!'); end; end;
Man laver en Console app i delphi, som athlon skriver så bliver det en win32 console app du får, det har ikke noget med dos at gøre, men er en win32 "commandoline" der ser ud som en "dos-box"
begin Writeln('Mok Systems v.1.0'); Str := 'Online ' + DateTimeToStr(Now); Writeln(Str); Writeln; Input := ''; while Input <> 'EXIT' do begin Write('>'); Readln(Input); Input := UpperCase(Input); if Input = 'ICQ' then begin Writeln('Starting ICQ......'); Shellexecute(Application.Handle, 'OPEN', 'c:\programmer\icq\icq.exe', nil, nil, SW_SHOW); Writeln('ICQ Running!'); end else if Input = 'DELPHI' then begin Writeln('Starting Delphi......'); Shellexecute(Application.Handle, 'OPEN', 'c:\programmer\borland\delphi6\bin\delphi32.exe', nil, nil, SW_SHOW); Writeln('Delphi Running!'); end else if Input <> 'EXIT' then Writeln('Ukendt kommando!'); end; end.
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.