Page 2 of 2
Re: MediaMonkey for ebooks?
Posted: Tue Jan 05, 2010 2:42 pm
by Clouseau
Ok, I've made some headway on the LIT problem. Apparently, I need to do a string replace in C to double all "\" characters in the path. Don't know why PDF and TXT files work fine but LIT fails (thanks Microsloth). Having compiler issues (can't use malloc for some reason). If anyone can get me some C code for a find/replace on strings that I can make work, it would be helpfull.
BTW, I've moved my MediaMonkey.ini into the MediaMonkey directory and made a copy called MediaMonkey-eBooks... now I (after modifying the second ini) I have two separate instances of MediaMonkey, one for music and one for eBooks. things are looking up!

Re: MediaMonkey for ebooks?
Posted: Wed Jan 06, 2010 3:35 pm
by Clouseau
OK, never mind about the slashes... it's not that... Microsoft Reader

DOES NOT LIKE SHORT FILE NAMES

, and that's what gets passed from MediaMonkey. I just don't know how to get a long file name using ANSI-C. I've tried compiling using Visual C++ and it's a no-go. I'll probably have to kludge it using compiled KixScript or something that will look up the long file name and launch Microsoft Reader. Any suggestions welcome!
Re: MediaMonkey for ebooks?
Posted: Thu Jan 07, 2010 12:52 pm
by Clouseau

WooooHoooo!!
LIT files open now! Wrote a very short VBS and compiled the IN_LIT.dll to pass the short filename to it (OpenShortFile.vbs). The script gets the long filename and does a ShellExecute and, voila, up pops MS Reader with the eBook.
OpenShortFile.vbs
Code: Select all
option explicit
dim oArgs, fn
dim objShell
set oArgs = Wscript.Arguments
if oArgs.count=0 then
wscript.echo "No argument given"
wscript.quit
end if
fn = oArgs.item(0)
set objShell = CreateObject("Shell.Application")
objShell.ShellExecute LongName(fn), "", "", "open", 1
set objShell = nothing
'===================================================
Function LongName(ShortName)
With CreateObject("WScript.Shell")
With .CreateShortcut("dummy.lnk")
.TargetPath = ShortName
LongName = .TargetPath
End with
End with
End Function
Re: MediaMonkey for ebooks?
Posted: Sat Jul 23, 2011 9:46 am
by Peke
What do you mean MM sends Short Filename I have not observed that?