On 22-9-2022 21:26, Travis Siegel via fpc-pascal wrote:
That's on windows, you said the program was running on linux.
Afaik he said he was on Windows, but his files are on a Linux server:
James richter Wrote:
I just figured out that short filenames won't work, my files are on a linux
serv
Dennis Lee Bieber via fpc-pascal schrieb
am Fr., 23. Sep. 2022, 04:10:
>If FP is attempting to translate \ into some escape code, you
> might try doubling the backslashes... C:\\Program Files\\My Program\\...
> (I'm presuming "Progam" is a typo.
>
FPC has no need for that as "\" isn't us
y\ Progam\Some\ File.MP3 can possibly work.. it's just
butchering the path.
James
From: fpc-pascal On Behalf
Of Travis Siegel via fpc-pascal
Sent: Wednesday, September 21, 2022 4:15 PM
To: FPC-Pascal users discussions
Cc: Travis Siegel ; Jean SUZINEAU
Subject: Re: [fpc-pascal] mciSendStri
al On Behalf Of Travis
Siegel via fpc-pascal
Sent: Thursday, September 22, 2022 3:27 PM
To: ja...@productionautomation.net; FPC-Pascal users discussions
Cc: Travis Siegel ; James Richters
Subject: Re: [fpc-pascal] mciSendString with long file names
That's on windows, you said the pro
.
James
From: fpc-pascal On Behalf Of Travis
Siegel via fpc-pascal
Sent: Wednesday, September 21, 2022 4:15 PM
To: FPC-Pascal users discussions
Cc: Travis Siegel ; Jean SUZINEAU
Subject: Re: [fpc-pascal] mciSendString with long file names
Adding a backslash (\) before each space should do
Behalf Of Travis
Siegel via fpc-pascal
Sent: Wednesday, September 21, 2022 4:15 PM
To: FPC-Pascal users discussions
Cc: Travis Siegel ; Jean SUZINEAU
Subject: Re: [fpc-pascal] mciSendString with long file names
Adding a backslash (\) before each space should do the job nicely. I have ha
Adding a backslash (\) before each space should do the job nicely. I
have had similar issues on linux and windows with some commands, and
adding the escape characters to the filename almost always fixes the
problem. The only time it didn't, was when the filename started with a
dash "-" charac
7;
Cc: James Richters ; 'Alexander
Hofmann'
Subject: Re: [fpc-pascal] mciSendString with long file names
That Alias method does seem to work.. thank you for the suggestion, although
it makes it more complicated for asynchronous operation, which is of course
what I wanted.
So here is
That Alias method does seem to work.. thank you for the suggestion, although it
makes it more complicated for asynchronous operation, which is of course what I
wanted.
So here is what I came up with.. for synchronous operation, this works fine:
mciSendString(Pchar(Ansistring('Open ' + #34+MyLong
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
Hi,
I'm not so sure if that's an FPC-only issue. MCI commands like that have been
around for a while, so spaces might not have been "considered" in the first
place.
A workaround was presented years ago, I can only find the archived version:
https://ftp.zx.net.nz/pub/archive/ftp.microsoft.com/M
I just figured out that short filenames won't work, my files are on a linux
server... not NTFS drives.. so I'm back to getting it to work with spaces
the normal file names
James
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.fr
I just tried it that way:
Var
pcmd: String;
MyFileName: String;
pcmd:='play "'+MyFileName+'"'+#0;
mciSendString(@pcmd[1],Nil,0,0);
I get the same results, files with no spaces in the name even long file
names play fine, if there's spaces, they won't play.
I had the idea to just get the wind
myself
so the FreePascal one might take parameters differently.
From: fpc-pascal on behalf of James
Richters via fpc-pascal
Sent: Tuesday, September 20, 2022 9:56:03 AM
To: 'FPC-Pascal users discussions'
Cc: James Richters
Subject: [fpc-pascal] mciS
I'm trying to get mciSendString() to work with long file names with spaces
in them and I'm not having any success.
I know with winnows you need quotes around long file names, so I'm trying
things like this:
Var MySoundFile:String;
mciSendString(PChar('play '+Ansistring(#34+MySoundFile+#34)),Nil,0
15 matches
Mail list logo