This thing finds selected filetypes in folders. You can add your own filetypes.
dialog thingy {
title "filetype finder"
size -1 -1 300 350
option pixel
list 1, 10 10 280 200
button "select dir." 2, 60 201 60 25
button "open file" 3, 120 201 60 25
button "clear" 8, 180 201 60 25
button "play file (if sound file)" 4, 90 228 120 25
list 5, 120 260 60 50
edit "" 6, 80 308 60 20
button "add" 7, 142 308 40 20
button "del" 9, 184 308 40 20
}
on 1:dialog:thingy:sclick:2: {
write -c files.txt
set %findf $sdir(/)
set %numr 1
:roflmao
set %lol $findfile(%findf, * [ $+ [ $did(5).seltext ] ] , %numr, did -a thingy 1 $nopath($1-))
write files.txt $findfile(%findf, * [ $+ [ $did(5).seltext ] ] , %numr)
inc %numr 1
if ( %lol != $null ) { goto roflmao }
else {
halt
}
}
on 1:dialog:thingy:sclick:3: {
set %fileopen $read(files.txt, w, * [ $+ [ $did(1).seltext ] ] [ $+ [ * ] ] )
run %fileopen
echo %fileopen
}
on 1:dialog:thingy:sclick:4: {
set %fileplay $read(files.txt, w, * [ $+ [ $did(1).seltext ] ] [ $+ [ * ] ] )
splay %fileplay
}
on 1:dialog:thingy:init:0: {
set %hwk.nmr 1
set %wkh.nmr $lines(filetypes.txt)
inc %wkh.nmr 1
:hawknumber
did -a thingy 5 $read(filetypes.txt, %hwk.nmr)
inc %hwk.nmr 1
if ( %hwk.nmr < %wkh.nmr ) { goto hawknumber }
else {
halt
}
}
on 1:dialog:thingy:sclick:7: {
write filetypes.txt $did(6)
did -a thingy 5 $did(6)
}
on 1:dialog:thingy:sclick:8: {
did -r thingy 1
write -c files.txt
}
on 1:dialog:thingy:sclick:9: {
set %filet1 $did(5).sel
write -dl [ $+ [ %filet1 ] ] filetypes.txt
did -d thingy 5 %filet1
}
menu * {
.filetype finder:/dialog -md thingy thingy
}