Yes, I have many partitions so m: drive is there on my pc, although it is a usb drive but other sounds of path as long as 127 chars on the same m: drive are working fine for me.
@bobycom, can you post your tested script code here.
Jump to content
Here it is:
~LButton::SoundPlay, %A_WinDir%\Media\ding.wav ~LButton up::SoundPlay, M:\12345678901234567890123456789012345678901234567890\12345678901234567890123456789012345678901234567890\12345678901234567890123456789012345678901234567890\chimes.wav ~RButton::SoundPlay, C:\Documents and Settings\bobycom\My Documents\My Received Files\12345678901234567890123456789012345678901234567890\12345678901234567890123456789012345678901234567890\chord.wav ~RButton up::SoundPlay, G:\1234567890 1234567890 1234567890 1234567890 1234567890\1234567890 1234567890 1234567890 1234567890 1234567890\1234567890 1234567890 1234567890 1234567890 1234567890\chimes.wav
I took the wave files from my Windows folder.
My M: drive is a mounted network drive.
My G: drive is a flash drive.
All are working fine. I noticed that the sounds are not playing if I hold any of the Ctrl, Alt or Shift keys.
BTW what version of AHK you are using. As I said before, mine is the last one, i.e. 1.1.19.01.
@bobycom, makes sense that holding a modifier key doesn't play the sounds. They probably would if you did ~*LButton, etc.
I'm on 1.1.15.01 and couldn't get AHK to play in long directories on my C drive, but will do an upgrade to see if this was some recent fix.
I've upgraded now, but I was on 1.1.15.01 Unicode 64-bit on Windows 8.1. I will test 1.1.19.01 Unicode 64-bit on WIndows 8.1 when I get to an environment where it's appropriate.
Reporting back to say that with latest AHK (1.1.19.01) Unicode 64-bit on Windows 8.1 that long file paths do not play sound:
NumpadEnter::SoundPlay, C:\Users\Exaskryz\Desktop\This is a really long folder name because I need to reach the limits of the maximum entropy for what I am bestowed\Keep the good times rolling - almost there\Test.wav
Hitting NumpadEnter does not work there. Putting quotes around the file path doesn't work either. But if I drop it to
NumpadAdd:: SoundPlay, C:\Users\Exaskryz\Desktop\Test.wav things are fine.
I tested it again on Windows 8.1 Pro 64bit and it is not working.
I suggest you replace the function SoundPlay with DllCall. It is playing fine this way:
~RButton::DllCall("winmm.dll\PlaySound", AStr, "C:\Users\Kop4o\Desktop\This is a really long folder name because I need to reach the limits of the maximum entropy for what I am bestowed\Keep the good times rolling - almost there\Alarm01.wav", uint, 0, uint, 1)
After some experiments I set the last parameter to 1, because when it was 0 the script was waiting the file to stop playing.
Now the only problem is that you can not interupt the DllCall with SoundPlay so all of them should be replaced.