Long FileName Grief: need work around!

Ken Ray kray at sonsothunder.com
Sat Jul 1 16:03:09 EDT 2006


> Ok the problem of long file  names on the Mac not working in
> Revolution continues to "bite me" at every turn... Here's the latest.

I'm not sure if this is what you're looking for, but the following function
takes a hashed shortened file name and returns the full long name to it
using AppleScript:

function stsLongFilePath pPath
  switch (the platform)
  case "MacOS"  -- assumes OS X
    put "set tPath to" && quote & pPath & quote & cr & \
        "set tPath to (POSIX file tPath) as string" & cr & \
        "POSIX path of tPath" into tScript
    do tScript as "AppleScript"
    return (char 2 to -2 of the result)  -- strips quotes
    break
  case "Win32"
    return the longFilePath of pPath
    break
  end switch
end stsLongFilePath

So if you did a drag-and-drop operation and the path is hashed, you could
run it through stsLongFilePath to get the full path name.

Perhaps some variation of this will work for you...

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/






More information about the use-livecode mailing list