this one is nasty:
global arr := ["ambient", "ambient2", "ambient3", "ambient4", "ambient5", "ambient6", "ambient7", "ambient8", "randambient2", "randambient2"]
Random, oVar, 1, arr.MaxIndex()
rand := arr[oVar]
Run "D:\foobar2000\foobar2000.exe" /runcmd=File/Scheduler/%rand%
foo_scheduler actions:
ambient#
Set playback order to “Repeat (Playlist)”
Set active playlist “ambient”
Start playback from track #123456
randambient2
Set playback order to “Random”
Set active playlist “ambient”
Start playback
1 seconds delay
Next track
1 seconds delay
Set playback order to “Repeat (Playlist)”
here is my config… save as .xml
<root>
<service minimized="false" num_exec="1">
<label>Open Directory</label>
<path>"$substr(%_path%,0,$strrchr(%_path%,'\'))"</path>
</service>
<service minimized="false" num_exec="1">
<label>Explore Directory</label>
<path>explorer /E,"$substr(%_path%,0,$strrchr(%_path%,'\'))"</path>
</service>
<service minimized="false" num_exec="1">
<label>OpenAs...</label>
<path>rundll32.exe shell32.dll,OpenAs_RunDLL %_path%</path>
</service>
<service minimized="false" num_exec="1">
<label>$if(%link%,Follow %link%,No link available)</label>
<path>"%link%"</path>
</service>
<service minimized="false" num_exec="1">
<label>Google Artist</label>
<path>http://www.google.com/search?q=$replace(%artist%, ,+)&ie=utf-8</path>
</service>
<service minimized="false" num_exec="1">
<label>Google Artist + Title</label>
<path>http://www.google.com/search?q=$replace(%artist%+%title%, ,+)&ie=utf-8</path>
</service>
<service minimized="false" num_exec="1">
<label>AllMusic Artist</label>
<path>http://www.allmusic.com/cg/amg.dll?P=amg&sql=$replace(%artist%, ,+)&x=0&y=0&opt1=1&sourceid="Mozilla-search"</path>
</service>
<service minimized="false" num_exec="1">
<label>AllMusic Album</label>
<path>http://www.allmusic.com/cg/amg.dll?P=amg&sql=$replace(%album%, ,+)&x=0&y=0&opt1=2&sourceid="Mozilla-search"</path>
</service>
<service minimized="false" num_exec="1">
<label>AllMusic Song</label>
<path>http://www.allmusic.com/cg/amg.dll?P=amg&sql=$replace(%title%, ,+)&x=0&y=0&opt1=3&sourceid="Mozilla-search"</path>
</service>
<service minimized="false" num_exec="1">
<label>last.fm title</label>
<path>http://www.google.com/search?q=site:last.fm+$replace(%artist%+%title%, ,+)&ie=utf-8&btnI</path>
</service>
<service minimized="false" num_exec="1">
<label>lyrics</label>
<path>https://lite.duckduckgo.com/lite/?q=$replace(%artist%+%title%, ,+,&,)+lyrics</path>
</service>
<service minimized="false" num_exec="1">
<label>utube</label>
<path>http://www.youtube.com/results?search_query=$replace(%album artist%+%title%, ,+)</path>
</service>
<service minimized="false" num_exec="11">
<label>mp3split</label>
<path>"D:\windows\program files x64\mp3splt\mp3splt.exe" -t 10.00 "%path%" -d "D:\pod"</path>
</service>
<service minimized="false" num_exec="1">
<label>last.fm artist</label>
<path>http://www.last.fm/music/$replace(%artist%, ,+)</path>
</service>
<service minimized="false" num_exec="1">
<label>discogs</label>
<path>http://www.discogs.com/search/?q=$replace(%album artist%+%album%, ,+)</path>
</service>
<service minimized="false" num_exec="1">
<label>rate</label>
<path>http://rateyourmusic.com/search?searchtype=l&searchterm=$replace(%album artist%+%album%, ,+)</path>
</service>
<service minimized="false" num_exec="1">
<label>last.fm sure</label>
<path>http://www.last.fm/music/$replace(%artist%/_/%title%, ,+)</path>
</service>
<service minimized="false" num_exec="1">
<label>wiki</label>
<path>https://en.wikipedia.org/w/index.php?search=%album artist%+, ,+</path>
</service>
<service minimized="false" num_exec="1">
<label>album art</label>
<path>"C:\Program files\AlbumArtDownloader\albumart.exe" "%artist%" "%album%" "$replace(%_path%,%_filename_ext%,)cover.jpg"</path>
</service>
</root>