#module
#deffunc mciload str, int
mref file, 32 : mref no, 1
cntno = no
mci "close _" + cntno
strmid i, file, , 2 : int i
if i {
file = "cdaudio!?"
poke file, 8, i + 64
}
mci "open \"" + file + "\" alias _" + cntno
return
#deffunc mciend onexit
mci "stop all"
mci "close all"
return
#deffunc mcitrackmax
mci "status _" + cntno + " number of tracks"
return
#global
sdim drv, 128
repeat 26, 1
if cnt > 1 : drv += "\n"
wpoke drv, (cnt - 1) * 3, (':' << 8) + cnt + 64 // コンボボックス用に「A: B: C: … Z:」を格納
loop
pos 10, 10 : combox index, 100, drv
pos 10, 40 : button "確認", *check
stop
*check
s = index + 1 : str s
mciload s
mcitrackmax
if stat = -1 {
dialog "CD/DVDドライブではないか、\nドライブにディスクがセットされていません"
} else {
dialog "" + stat + "トラックが存在します"
}
stop
|