AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A_LoopFileLongPath (1.0.25.14)

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
[deXter]



Joined: 28 Nov 2004
Posts: 35

PostPosted: Wed Feb 09, 2005 1:46 am    Post subject: A_LoopFileLongPath (1.0.25.14) Reply with quote

Hi, I think there is a bug in A_LoopFileLongPath.
In short, A_LoopFileLongPath doesn't contain the full extension of a file- The last two charecters of the extension are truncated.

ie, a file name of something like foo.txt would be read as foo.t and foo.html would become foo.ht

Could someone confirm this?

----
Btw, this seems to occur only while drag-dropping a file onto a script. Launching the script by manually providing the parameters doesn't seem to have this problem.
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Wed Feb 09, 2005 2:05 am    Post subject: Reply with quote

I can confirm, and I also know what the problem is, at least to an extent. A_LoopFileLongPath is the same length as A_LoopFileShortPath, with any extra characters truncated. For instance, here's my test script:

Code:
loop,%1%
{
   stringlen,var1,a_loopfileshortpath
   stringlen,var2,a_loopfilelongpath
   msgbox,%a_loopfileshortpath%: %var1%`n%a_loopfilelongpath%: %var2%
}
return


You'll see they're the same length. Confused This does indeed work with drag-and-drop, but that's probably because drag-and-dropping uses short paths internally. If you run it manually using short paths in the parameter (and thus, in the loop), the same problem will occur. If it's run in any way using long path names, it will work correctly.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Wed Feb 09, 2005 4:21 am    Post subject: Reply with quote

Thanks, that should be fixed in the next update (hopefully tomorrow).
Back to top
View user's profile Send private message Send e-mail
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Feb 10, 2005 10:31 pm    Post subject: Reply with quote

This has been fixed in today's release. Thanks for reporting it.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group