Thema: Delphi Syntax SendMCICommand

Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.152 Beiträge
 
Delphi 12 Athens
 
#3

AW: Syntax SendMCICommand

  Alt 22. Jul 2012, 23:02
Delphi-Quellcode:
Pfad := '"'+ExtractFilePath(Application.ExeName) + '\Sounds\Sound1.wav"'
SendMCICommand('play ' + Pfad);
\\ ?

Delphi-Quellcode:
// Path = mit \ am Ende
Pfad := '"' + ExtractFilePath(Application.ExeName) + 'Sounds\Sound1.wav"';
SendMCICommand('play ' + Pfad);

// Dir = ohne \ am Ende (gut, mit einer kleinen Ausnahme)
Pfad := '"' + ExtractFileDir(Application.ExeName) + '\Sounds\Sound1.wav"';
SendMCICommand('play ' + Pfad);

// aber da die " eigentlich nicht zum "Pfad" gehören
Pfad := ExtractFilePath(Application.ExeName) + 'Sounds\Sound1.wav';
SendMCICommand('play "' + Pfad + '"');
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests
  Mit Zitat antworten Zitat