AutoHotkey Community

It is currently May 27th, 2012, 11:59 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: November 8th, 2010, 7:03 am 
Offline

Joined: April 22nd, 2008, 7:13 pm
Posts: 82
Hi AHKers!
Does anybody know if soundplay is sensitive to filename length?

Code:
File = C:\Users\Evan\Documents\My Documents\Work and Telopea FILMOOSH\Tech-ed\Inclusive IT\The Open Communicator\Data\AAAAAAAGreen.wav
Soundplay, %File%,wait
msgbox, Attempt 1 =  %errorlevel%`n%File%

File = C:\Users\Evan\Documents\My Documents\Work and Telopea FILMOOSH\Tech-ed\Inclusive IT\The Open Communicator\Data\AAAAAAAAGreen.wav
Soundplay, %File%,wait
msgbox, Attempt 2 =  %errorlevel%`n%File%


I've got the same two .wav files and the only difference is the filename with one having an extra 'A' in it. The first one plays fine, the second attempt returns an errorlevel of 1. The first one is 127 characters (including spaces) and the second is 128 unless I've miscounted. I've tried longer and shorter filenames and they all stop working at the 128 character mark on my system.


Any ideas? Similar situations? Evs

_________________
Inventing problems that need solutions...

Open Communicator
MouseTrainer


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 8th, 2010, 1:37 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Works just fine for me, what AHK version do you use?

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 8th, 2010, 2:56 pm 
Offline

Joined: May 1st, 2010, 6:01 pm
Posts: 1020
Location: England
maybe cause u use the same variable twice


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 9th, 2010, 5:20 am 
Offline

Joined: April 22nd, 2008, 7:13 pm
Posts: 82
I'm using v1.0.48.05

I tried changing the variable names which hasn't helped (good idea tho). And adding in a check to make sure the file exists and that I haven't done a spelling mistake tells me everything there is fine too.

Code:
File = C:\Users\Evan\Documents\My Documents\Work and Telopea FILMOOSH\Tech-ed\Inclusive IT\The Open Communicator\Data\AAAAAAAGreen.wav
Soundplay, %File%,wait
msgbox, Attempt 1 =  %errorlevel%`n%File%


File2 = C:\Users\Evan\Documents\My Documents\Work and Telopea FILMOOSH\Tech-ed\Inclusive IT\The Open Communicator\Data\AAAAAAAAGreen.wav
IfExist,%File2%
{
msgbox, THE MATRIX HAS YOU!

Soundplay, %File2%,wait
msgbox, Attempt 2 =  %errorlevel%`n%File2%
}


Still returns an error. And If I just switch the files around so that the first attempt has the longer filename then the first one fails and the second one succeeds, indicating to me that it is not a problem with any of the code, The file qith the longer name plays fine when put in a folder closer to the root or when I change it's filename to be one character shorter, this is getting frustrating...

_________________
Inventing problems that need solutions...

Open Communicator
MouseTrainer


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 9th, 2010, 10:54 am 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
I have created same folder structure as yours and it worked fine.
Can you try another drive or USB stick?

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 10th, 2010, 9:35 am 
Offline

Joined: April 22nd, 2008, 7:13 pm
Posts: 82
HotHeyIt, thanks for your suggestion, just tried it on my usb drive and the same problem occurs. Changed the folder names entirely as well and still the same problem. If I reduce the length of the longer filename (and the corresponding code:), it instantly works. Still doing the ifexist check first too. Also tried re-installing latest AHK and installing AHK_L, which by the way Avira Antivir says has a trojan (but I don't really believe it).

In case it helps I'm using Vista 32bit.
Thanks, evs

_________________
Inventing problems that need solutions...

Open Communicator
MouseTrainer


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 12th, 2010, 1:44 am 
Offline

Joined: April 22nd, 2008, 7:13 pm
Posts: 82
To make matters more interesting i've just discovered that when I use a .wma file instead of a .wav using the exact same method the file plays fine! All i did was copy the file with the longer name and then rename it to a .wma and changed the code as follows:


Code:

File1 = C:\Users\Evan\Documents\My Documents\Work and Telopea FILMOOSH\Tech-ed\Inclusive IT\The Open Communicator\Data\AAAAAAAGreen.wav
IfExist,%File1%
{
Soundplay, %File1%,wait
msgbox, Attempt 1 =  %errorlevel%`n%File1%
}
Else
msgbox, File 1 Not Found!



File2 = C:\Users\Evan\Documents\My Documents\Work and Telopea FILMOOSH\Tech-ed\Inclusive IT\The Open Communicator\Data\AAAAAAAAGreen.wav
IfExist,%File2%
{
Soundplay, %File2%,wait
msgbox, Attempt 2 =  %errorlevel%`n%File2%
}
Else
msgbox, File 2 Not Found!


File3 = C:\Users\Evan\Documents\My Documents\Work and Telopea FILMOOSH\Tech-ed\Inclusive IT\The Open Communicator\Data\AAAAAAAAGreen.wma
IfExist,%File3%
{
Soundplay, %File3%,wait
msgbox, Attempt 3 =  %errorlevel%`n%File3%
}
Else
msgbox, File 3 Not Found!


The first and third attempt plays fine but the second one doesn't when the ONLY difference between the second and third is the file extension! But .wav obviously plays on my system because the first attempt works. WHAT THE HECK! Can anyone explain/mock?

_________________
Inventing problems that need solutions...

Open Communicator
MouseTrainer


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, Google [Bot], Google Feedfetcher, Yahoo [Bot] and 20 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group