For as long as Ive had a car computer Ive wanted some sort of a random album selector so I didnt have to clumbsily attempt to select a new album and artist while driving if my music ran out
It never ocurred to me before but I finally figured out I could use an automation program called AutoIt. AutoIt makes it happen but with a few complications (see end of post)
This script when run with Centrafuse open in 800x600 will select and load a random album from your media library
Script:
http://www.dwoloz.com/centrafuse-autoalbum.exe
Source:
Code:
;
; AutoIt Version: 3.0
; Language: English
; Platform: Win9x/NT
; Author: aoLhaTer
;
; Script Function:
; Automatically select and load an album in Centrafuse - 800x600
;
; Click on the media button
MouseClick( "left", 53, 133, 1, 0 )
; Click on the media list button
MouseClick( "left", 750, 238, 1, 0 )
; Click on the Library button to make sure we're at the root
MouseClick( "left", 104, 108, 1, 0 )
; Hit enter to proceed to artists
Send( "{ENTER}" )
; Create a random integer, 122(+1) is the max artists
$X = Random ( 0, 122, 1 )
; Go down the list X times
For $I = 0 To $X
Send( "{DOWN}" )
Next
; Hit enter to proceed to random artist
Send( "{ENTER}" )
; Create a new random integer, 2(+1) is the max albums
$X = Random ( 0, 2, 1 )
; Go through the albums X times
For $I = 0 To $X
Send( "{DOWN}" )
Next
; Click load to play album
MouseClick( "left", 410, 490, 1, 0 )
; Finished!
If you want to recompile this is the program, AutoIt
http://www.autoitscript.com/autoit3/
Ive tested this on my desktop computer and it seems to run great. Have yet to test it in the car
Now, there are some complications I ran into. The script is completely unaware of how many artists there are in your database and its also unaware of how many albums each artist has. Therefore when the script does its random number generator you have to set the maximum numbers yourself. In the compiled EXE you see above Ive used a maximum of 123 artists and a maximum of 3 albums. The artist randomization will work fine....except when you add new artists. The album randomization will work but it will skip any albums if an artist has more than 3 and it will also give more weight to the 2nd album if the artist only has 2.
If anyone can figure out a solution to this please share. Only solution in my estimation is to get the library data from Centrafuse's dat file and know exact numbers from there.