;Alan's Jukebox #2 Script ;Place the following script in a spot named Playlist. ;Place the Jukebox picture in this spot. ON ENTER { tunelist GLOBAL { ;***list your tunes here [ "tune_a1" "tune_a2" "tune_a3" "tune_a4" "tune_a5" "tune_a6" "tune_a7" "tune_a8" "tune_a9" "tune_a10" ] Atunearray = [ "tune_b1" "tune_b2" "tune_b3" "tune_a4" "tune_a5" ] Btunearray = [ "tune_c1" "tune_c2" "tune_c3" ] Ctunearray = [ ] Dtunearray = [ ] Etunearray = [ ] Ftunearray = [ ] Gtunearray = [ ] Htunearray = [ ] Jtunearray = [ ] Ktunearray = ;***end of list [ "Atunearray" "Btunearray" "Ctunearray" "Dtunearray" "Etunearray" "Ftunearray" "Gtunearray" "Htunearray" "Jtunearray" "Ktunearray" ] arraynames = } tunelist DEF ; playlist GLOBAL { arrayname 0 1 SUBSTRING letter = 1 number = { tune = letter number ITOA & " " & tune & LOGMSG number ++ } arrayname STRTOATOM EXEC FOREACH "" LOGMSG } playlist DEF } ON OUTCHAT { { MIDISTOP ;if Midi on a PC "" CHATSTR = } CHATSTR "ms" == IF } ON SELECT { playlist GLOBAL tunelist GLOBAL tunelist EXEC ; "Instructions and the playlist are in your log." LOCALMSG "Click on a letter and then a number to select a tune." LOGMSG "If you have not previously played the tune you will have to wait for it to download to your computer and then select it again." LOGMSG "PC's - enter 'ms' to stop a tune that is playing." LOGMSG "\x0dAvailable selections are:" LOGMSG { arrayname = { playlist EXEC } arrayname STRTOATOM EXEC LENGTH IF } arraynames FOREACH } ;Place the following script in a spot named Make Selection: ON ENTER { arrayname GLOBAL "" arrayname = arraylength GLOBAL 0 arraylength = } ON SELECT { tunelist GLOBAL tunelist EXEC arrayname GLOBAL arraylength GLOBAL playlist GLOBAL ;***set x and y values for selection keys 190 xleft = 340 xright = 333 yup = 367 ydown = ;*** MOUSEPOS y = x = { x xleft - xright xleft - 10 / / column = y yup - ydown yup - 2 / / row = ;selected letter - list tunes available { arraynames column GET arrayname = arrayname STRTOATOM EXEC LENGTH arraylength = { "\xodAvailable selections are:" LOGMSG playlist EXEC } arraylength IF } row 0 == IF ;selected number - play it { arrayname STRTOATOM EXEC column GET tune = "You have selected " tune & LOCALMSG tune SOUND ;use MIDIPLAY in case a midi on an old PC client. { CHATSTR MIDIPLAY } IPTVERSION NOT IF } row 1 == column arraylength < AND IF } x xleft > x xright < AND y yup > AND y ydown < AND IF }