[fpc-pascal] mciSendString with long file names

Jean SUZINEAU jean.suzineau at wanadoo.fr
Tue Sep 20 22:16:13 CEST 2022


May be by escaping the spaces with ^ ?

Something like:  MyFileName:= StringReplace(MyFileName, ' ', '^ ', 
[rfReplaceAll]);

^ is the escape char for cmd.exe but may be it is active in this context 
too ?

Le 20/09/2022 à 18:31, James Richters via fpc-pascal a écrit :
>
> I just tried it that way:
>
> Var
>
> pcmd: String;
>
> MyFileName: String;
>
> pcmd:='play "'+MyFileName+'"'+#0;
>
> mciSendString(@pcmd[1],Nil,0,0);
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20220920/416949c6/attachment-0001.htm>


More information about the fpc-pascal mailing list