Re: [fpc-pascal] mciSendString with long file names

2022-09-23 Thread Marco van de Voort via fpc-pascal
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

Re: [fpc-pascal] mciSendString with long file names

2022-09-22 Thread Sven Barth via fpc-pascal
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

Re: [fpc-pascal] mciSendString with long file names

2022-09-22 Thread Travis Siegel via fpc-pascal
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

Re: [fpc-pascal] mciSendString with long file names

2022-09-22 Thread James Richters via fpc-pascal
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

Re: [fpc-pascal] mciSendString with long file names

2022-09-22 Thread Travis Siegel via fpc-pascal
. 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

Re: [fpc-pascal] mciSendString with long file names

2022-09-22 Thread James Richters via fpc-pascal
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

Re: [fpc-pascal] mciSendString with long file names

2022-09-21 Thread Travis Siegel via fpc-pascal
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

Re: [fpc-pascal] mciSendString with long file names

2022-09-20 Thread James Richters via fpc-pascal
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

Re: [fpc-pascal] mciSendString with long file names

2022-09-20 Thread James Richters via fpc-pascal
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

Re: [fpc-pascal] mciSendString with long file names

2022-09-20 Thread Jean SUZINEAU via fpc-pascal
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

Re: [fpc-pascal] mciSendString with long file names

2022-09-20 Thread Alexander Hofmann via fpc-pascal
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

Re: [fpc-pascal] mciSendString with long file names

2022-09-20 Thread James Richters via fpc-pascal
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

Re: [fpc-pascal] mciSendString with long file names

2022-09-20 Thread James Richters via fpc-pascal
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

Re: [fpc-pascal] mciSendString with long file names

2022-09-20 Thread Alexander Grotewohl via fpc-pascal
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

[fpc-pascal] mciSendString with long file names

2022-09-20 Thread James Richters via fpc-pascal
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