EvilLyrics forum
June 25, 2017, 05:45:02 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: 1
  Print  
Author Topic: How to: Make EvilLyrics work with Milkdrop 2. Without focus on Window.  (Read 5598 times)
cmw
Guest
« on: October 13, 2011, 06:06:47 AM »

This is for Windows 7, it should work with every Windows, but you have to adjust the path accordingly.

1) Install AutoHotkey: http://www.autohotkey.com/
Warning: This is an insanely powerful tool. Do not toy with.

2) Go to C:\Users\YOURUSERNAME\AppData\Roaming\Winamp\Plugins  (AppData is a hidden folder)
and create a folder named "copy"

3) Create a new text file and paste this:

Code:
while 1=1
{
Sleep, 300
Loop, %USERPROFILE%\AppData\Roaming\Winamp\Plugins\milk2_msg.ini
{
    copy_it = n
    IfNotExist, %USERPROFILE%\AppData\Roaming\Winamp\Plugins\copy\%A_LoopFileName%  ; Always copy if target file doesn't yet exist.
        copy_it = y
    else
    {
        FileGetTime, time, %USERPROFILE%\AppData\Roaming\Winamp\Plugins\copy\%A_LoopFileName%
        EnvSub, time, %A_LoopFileTimeModified%, seconds  ; Subtract the source file's time from the destination's.
        if time < 0  ; Source file is newer than destination file.
            copy_it = y
    }
    if copy_it = y
    {
        FileCopy, %A_LoopFileFullPath%, %USERPROFILE%\AppData\Roaming\Winamp\Plugins\copy\%A_LoopFileName%, 1   ; Copy with overwrite=yes
        ControlSend, , {f7}00, MilkDrop 2
    }
    
}
}

Save the file as "lyrics.ahk" It does not matter where you save the file, so best place it somewhere easy accessible, or possibly the Startup folder.

When you double click the file, it will execute the AutoHotkey script (you should see a green icon with an H in the tray bar).



4) In Evillyrics, make sure that Milkdrop Support is enabled in the options.

Everything should work now, fire up a song with Karaoke in Evillyrics and see if it works.

If the font is too big or not fully in the window, go to the milkdrop configuration dialogue --> Artist tools --> Edit Custom Messages. There decrease the size= value, and set x= and y= to 0.5 (or wherever you want the text to be). You can also change the font type there (Tahoma is standard)


Note: This works better than the original EvilLyrics support ever worked, because now you don't have to have focus on the Milkdrop Window, it will work regardless which window has focus. Tested with Windowed and Fullscreen mode, not sure if it works in Desktop, but Desktop mode is broken anyway.
Logged
EvilLyrics forum
« on: October 13, 2011, 06:06:47 AM »

 Logged
ClintJCL
Jr. Member
**

Karma: -3
Posts: 69


« Reply #1 on: January 25, 2012, 11:02:45 PM »

Oh wow, I've been waiting (and pestering Marek) for years for Milkdrop 2 support.

Too bad I couldn't get this to work.

And there's no real way to figure out why not.

Also, my winamp is in c:\program files\ even though it's windows 7 64-bit, because that's where I've hardcoded it in scripts for many years now. But I changed the paths, and added double quotes around it because of the space in program files.. like this:

Code:
while 1=1
{
Sleep, 300
Loop, "C:\Program Files\winamp\Plugins\milk2_msg.ini"
{
    copy_it = n
    IfNotExist, "C:\Program Files\winamp\Plugins\copy\%A_LoopFileName%"  ; Always copy if target file doesn't yet exist.
        copy_it = y
    else
    {
        FileGetTime, time, "C:\Program Files\winamp\Plugins\copy\%A_LoopFileName%"
        EnvSub, time, %A_LoopFileTimeModified%, seconds  ; Subtract the source file's time from the destination's.
        if time < 0  ; Source file is newer than destination file.
            copy_it = y
    }
    if copy_it = y
    {
        FileCopy, %A_LoopFileFullPath%, "C:\Program Files\winamp\Plugins\copy\%A_LoopFileName%", 1   ; Copy with overwrite=yes
        ControlSend, , {f7}00, MilkDrop 2
    }
    
}
}

But alas... No go. Not at all. I've even tried making that same folder in appdata/roaming - just for the one file - and yea, it's there. But it's not updating with the EvilLyrics lyrics. It's just the same "This is a test..." default message coming out with each line of karaoke. Same thing EvilLyrics does.

1) Any advice?? 'Cause this is epic, the best post since the last release of Milkdrop Smiley

2) Also: why the "copy" subfolder. I'm just trying to understand it more so I can possibly tinker with it, or do it some other way.

3) One more thing: Desktop mode works just fine, and EvilLyrics+Milkdrop1 has no problem doing it in Windows 7 64-bit regardless of focus. So that bit is interesting too.

4) P.P.P.S:  could you describe in english how this is accomplished? That might help me and others too. This is brilliant!!

5) Just thought of another question: Which version of Autohotkey did you install? Also, when installing, I think there was a choice of 3 different kinds of unicode/ansi combinations. Perhaps that is what's killing me here?

It just doesn't seem to be executing the loop. I put in OutputDebug, and it's just not happening. Filename is perfect, and also tried the short full path name as well, but no go. Just no go :/
Logged

-Clint
ClintJCL
Jr. Member
**

Karma: -3
Posts: 69


« Reply #2 on: January 25, 2012, 11:18:26 PM »

Basically, from me reading it, it just copies a file. I don't see how that fixes Milkdrop 2. The problem has never been, for me, getting the lyrics to display. They always display. The problem is they aren't the lyrics. It's just "This is a test..." over and over. Timed with each karaoke timestamp, of course. Argh. 45 minutes and I couldn't figure this out. JEALOUS! Smiley
Logged

-Clint
onionstick
Newbie
*

Karma: 0
Posts: 2


« Reply #3 on: November 20, 2012, 08:30:15 PM »

For myself the problem was that the milk2_msg.ini entry for 00 (which evil uses to show the current line) had a bad size, once changed the autohokey fix began displaying lyrics, not always perfect but nice to have them there anyway Smiley

the file is found in:
C:\Users\YOUR USERNAME\AppData\Roaming\Winamp\Plugins\milk2_msg.ini

I changed the entry for 00 to this:

Code:
[message00]
  text=not important, always gets changed
  font=1
  size=40

and it worked fine afterwards, make sure you have milkdrop ticked in evil lyrics preferences under the advanced tab.

Also I am running standard Winamp 5.622 with EvilLyrics 0.1.91

hope this helps.
Logged
ClintJCL
Jr. Member
**

Karma: -3
Posts: 69


« Reply #4 on: May 18, 2013, 11:19:48 PM »

I finally figured this out!

Use this code instead:

Code:
while 1=1
{
Sleep, 50
Loop, %USERPROFILE%\AppData\Roaming\Winamp\Plugins\milk_msg.ini
{
    copy_it = n
    IfNotExist, %USERPROFILE%\AppData\Roaming\Winamp\Plugins\milk2_msg.ini  ; Always copy if target file doesn't yet exist.
        copy_it = y
    else
    {
        FileGetTime, time, %USERPROFILE%\AppData\Roaming\Winamp\Plugins\milk2_msg.ini
        EnvSub, time, %A_LoopFileTimeModified%, seconds  ; Subtract the source file's time from the destination's.
        if time < 0  ; Source file is newer than destination file.
            copy_it = y
    }
    if copy_it = y
    {
        FileCopy, %USERPROFILE%\AppData\Roaming\Winamp\Plugins\milk_msg.ini, %USERPROFILE%\AppData\Roaming\Winamp\Plugins\milk2_msg.ini, 1   ; Copy with overwrite=yes
        ControlSend, , {f7}00, MilkDrop 2
    }
     
}
}


A better solution would be to make a hard link so that milk2_msg.ini always points to milk_msg.ini, but unfortunately Milkdrop2 or EvilLyrics re-writes that file, erasing the hard link.
Logged

-Clint
ClintJCL
Jr. Member
**

Karma: -3
Posts: 69


« Reply #5 on: July 07, 2015, 10:09:46 PM »

I recently fixed Milkdrop1 *AND 2 support not working.:

I fired up SysInternal's procmon.exe ....  Exclude all events.  Then include only events for EvilLyrics.  Look at the "Createfile" events. You can see the files it is trying to create. Mine show it trying to create a file in the wrong place:
c:\plugins\milk_msg.ini

(It doesn't matter why EvilLyrics is wrong. It's worked for 10 years for me -- This time I installed Winamp in a non-standard weird way. It's not EvilLyrics's fault.)

So all I have to do is use SysInternal's junction.exe tool:
junction c:\plugins "c:\program files\winamp\plugins"

Now "c:\plugins" is the same folder as "c:\program files\winamp\plugins". Now EvilLyrics, even though it is pointing to the wrong folder, the wrong folder is now pointing to the right folder! Milkdrop1 support will work!

But What about Milkdrop2 support?

The main issue holding back Milkdrop2 support is that EvilLyrics edits milk_msg.ini instead of milk2_msg.ini. 
I always get "This is a test...", the default Milkdrop2 message.

Now here's another kick in the ass. For me, I had 3 milk2_msg.inis. One in Winamp, and one in Winamp\plugins, and one in Winamp\plugins\Milkdrop2. I had to edit all 3 INIs with different profanity to figure out which one was being used. (I also could have used procMon.exe, mentioned earlier.)
For me, it turns out that:
Milkdrop1 is using the file winamp\plugins\milk_msg.ini
Milkdrop2 is using the file winamp\plugins\milkdrop2\milk2_msg.ini

I went into that milkdrop2 folder, I backed up milk2_msg.ini, then deleted it, then used windows mklink.exe:
mklink /J milk2_msg.ini ..\milk_msg.ini

(Note that using mklink /H doesn't work, a hardlink gets overwritten and lost, a symlink remains dangling and points at the new version of the file when evillyrics creates it.)

This makes it so that both filenames are actually the same file. If that makes no sense to you, envision it as 2 copies of the same file. If you do something to one, it happens to the other. Identical twins where if you punch one in the face, both get black eyes. EvilLyrics now writes to milk2_msg.ini even when it writes to milk_msg.ini. THIS FIXES MILKDROP2 SUPPORT BY MAKING IT WRITE TO THE CORRECT FILE.

There. You're done. You're welcome.



And you don't have to run/load autohotkey.
Logged

-Clint
EvilLyrics forum
   

 Logged
Pages: 1
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines EvilLyrics