MediaMonkey for ebooks?

Community forum for discussions completely unrelated to MediaMonkey.

Moderator: Gurus

Re: MediaMonkey for ebooks?

Postby Clouseau » Tue Jan 05, 2010 2:42 pm

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! :D
Clouseau
 
Posts: 7
Joined: Sat Jan 03, 2009 3:36 pm

Re: MediaMonkey for ebooks?

Postby Clouseau » Wed Jan 06, 2010 3:35 pm

OK, never mind about the slashes... it's not that... Microsoft Reader :evil: DOES NOT LIKE SHORT FILE NAMES :evil: , 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!
Clouseau
 
Posts: 7
Joined: Sat Jan 03, 2009 3:36 pm

Re: MediaMonkey for ebooks?

Postby Clouseau » Thu Jan 07, 2010 12:52 pm

:D WooooHoooo!! :D
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
Clouseau
 
Posts: 7
Joined: Sat Jan 03, 2009 3:36 pm

Re: MediaMonkey for ebooks?

Postby Peke » Sat Jul 23, 2011 9:46 am

What do you mean MM sends Short Filename I have not observed that?
Best regards,
Pavle
MM Core Developer and Fan (check HAPPYMONKEYING Site)
Image
Image
Peke
 
Posts: 7551
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia

Previous

Return to Off Topic

Who is online

Users browsing this forum: No registered users and 0 guests