I don't know if I will update this code. I just need to wait until I am really bored again.
To answer your question, the mouse scroller can be detected by mousemovez(). Something to be careful of is that you should have the mousemove stored as a variable and then test the variable. I have had problems with mousemovez returning a zero every time you call it more than once in a loop.
P.S. Does anyone know why there is a "" in my location? It's not there when I view my profile.
Edit------
Well, I got bored again. I am about to make it 20 lines (I am sure it will fit), but here is the code uncompressed.
sync on
type files
filename as string : filetype as string : filedate as string
endtype
clickpos=0
dim file(1000) as files
path$="C:"
backdrop on
color backdrop 0
do
exit prompt path$,"This path could not be followed!!!"
set dir path$
perform checklist for files
cq=checklist quantity()
find first
file(i).filename=get file name$()
t=get file type()
select t
case 0
file(i).filetype="file"
endcase
case 1
file(i).filetype="directory"
endcase
case -1
file(i).filetype="empty directory"
endcase
endselect
file(i).filedate=get file date$()
for i=2 to cq
find next
file(i).filename=get file name$()
t=get file type()
select t
case 0
file(i).filetype="file"
endcase
case 1
file(i).filetype="directory"
endcase
case -1
file(i).filetype="empty directory"
endcase
endselect
next i
top=1
c=0
while c=0
sync
set cursor 0,0
print path$
print "______________________________________________________________________________________________________"
for i=top to top+27
if i<cq and i>0
n$=file(i).filename
t$=file(i).filetype
d$=file(i).filedate
if i=clickpos and clickpos>0
ink rgb(0,255,255),0
else
ink -1,0
endif
print "|"+n$+space$(28-len(n$))+t$+space$(25-len(t$))+d$+space$(25-len(d$))+"|"
else
print ""
endif
next i
print "______________________________________________________________________________________________________"
mz=mousemovez()
if mz>0
dec top
endif
if mz<0
inc top
endif
if mouseclick()=1
c=int((mousey()+0.0)/(text height(n$))-2)+top
if c<1
c=0
endif
if c>cq
c=0
endif
if c>0
if c<>clickpos
clickpos=c
c=0
while mouseclick()=1
endwhile
endif
endif
endif
endwhile
while mouseclick()=1
endwhile
if file(c).filetype="directory"
c$=file(c).filename
path$=path$+c$+""
clickpos=0
endif
if file(c).filetype="empty directory"
exit prompt "Unknown Procedure","Empty Directory"
end
endif
if file(c).filetype="file"
c$=file(c).filename
path$=path$+c$
back$=""
for i=len(path$) to 1 step -1
new$=mid$(path$,i)
if new$="."
exit
endif
back$=back$+new$
next i
forward$=""
for i=len(back$) to 1 step -1
forward$=forward$+mid$(back$,i)
next i
forward$=lower$(forward$)
if forward$="bmp" or forward$="dds" or forward$="dib" or forward$="jpeg" or forward$="jpg" or forward$="png" or forward$="tga"
load image path$,1
sprite 1,0,0,1
size sprite 1,screen width(),screen height()
sync
exit prompt "Image Successfully Viewed","Done"
wait key
end
endif
if forward$="dbo" or forward$="3ds" or forward$="bsp" or forward$="md2" or forward$="md3" or forward$="mdl" or forward$="pak" or forward$="pk3" or forward$="x"
autocam off
sync rate 0
hide mouse
load object path$,1
exit prompt "Object Successfully Viewed","Done"
do
sync
move camera upkey()-downkey()
x#=camera angle x()
rotate camera 0,camera angle y()+90,0
move camera rightkey()-leftkey()
rotate camera x#+mousemovey()/2.0,camera angle y()-90+mousemovex()/2.0,0
if camera angle x()>90
xrotate camera 90
endif
if camera angle x()<-90
xrotate camera -90
endif
loop
endif
if forward$="mid" or forward$="midi" or forward$="mp3" or forward$="sgt"
load music path$,1
loop music 1
exit prompt "Music Successfully Listened To","Done"
wait key
end
endif
if forward$="aiff" or forward$="au" or forward$="snd" or forward$="wav"
load sound path$,1
loop sound 1
exit prompt "Sound Successfully Heard","Done"
wait key
end
endif
endif
loop
Edit------
Done. It's the same number of lines as before.
sync on
type files
filename as string : filetype as string : filedate as string
endtype : clickpos=0 : dim file(1000) as files : path$="C:\" : backdrop on : color backdrop 0 : do : exit prompt path$,"This path could not be followed!!!" : set dir path$ : perform checklist for files : cq=checklist quantity() : find first : file(i).filename=get file name$() : t=get file type() : select t : case 0 : file(i).filetype="file" : endcase : case 1 : file(i).filetype="directory" : endcase : case -1 : file(i).filetype="empty directory" : endcase
endselect : file(i).filedate=get file date$() : for i=2 to cq : find next : file(i).filename=get file name$() : t=get file type() : select t : case 0 : file(i).filetype="file" : endcase : case 1 : file(i).filetype="directory" : endcase : case -1 : file(i).filetype="empty directory" : endcase : endselect : next i : top=1 : c=0 : while c=0 : sync : set cursor 0,0 : print path$ : print "______________________________________________________________________________________________________"
for i=top to top+27 : if i<cq and i>0 : n$=file(i).filename : t$=file(i).filetype : d$=file(i).filedate : if i=clickpos and clickpos>0 : ink rgb(0,255,255),0 : else : ink -1,0 : endif : print "|"+n$+space$(28-len(n$))+t$+space$(25-len(t$))+d$+space$(25-len(d$))+"|" : else : print "" : endif : next i : print "______________________________________________________________________________________________________" : mz=mousemovez() : if mz>0 : dec top : endif : if mz<0 : inc top : endif : if mouseclick()=1 : c=int((mousey()+0.0)/(text height(n$))-2)+top
if c<1 : c=0 : endif : if c>cq : c=0 : endif : if c>0 : if c<>clickpos : clickpos=c : c=0 : while mouseclick()=1 : endwhile : endif : endif : endif : endwhile : while mouseclick()=1 : endwhile : if file(c).filetype="directory" : c$=file(c).filename : path$=path$+c$+"\" : clickpos=0 : endif : if file(c).filetype="empty directory" : exit prompt "Unknown Procedure","Empty Directory"
end : endif : if file(c).filetype="file" : c$=file(c).filename : path$=path$+c$ : back$="" : for i=len(path$) to 1 step -1 : new$=mid$(path$,i) : if new$="." : exit : endif : back$=back$+new$ : next i : forward$="" : for i=len(back$) to 1 step -1 : forward$=forward$+mid$(back$,i) : next i : forward$=lower$(forward$) : if forward$="bmp" or forward$="dds" or forward$="dib" or forward$="jpeg" or forward$="jpg" or forward$="png" or forward$="tga" : load image path$,1 : sprite 1,0,0,1 : size sprite 1,screen width(),screen height() : sync : exit prompt "Image Successfully Viewed","Done" : wait key
end : endif : if forward$="dbo" or forward$="3ds" or forward$="bsp" or forward$="md2" or forward$="md3" or forward$="mdl" or forward$="pak" or forward$="pk3" or forward$="x" : autocam off : sync rate 0 : hide mouse : load object path$,1 : exit prompt "Object Successfully Viewed","Done" : do : sync : move camera upkey()-downkey() : x#=camera angle x() : rotate camera 0,camera angle y()+90,0 : move camera rightkey()-leftkey() : rotate camera x#+mousemovey()/2.0,camera angle y()-90+mousemovex()/2.0,0 : if camera angle x()>90 : xrotate camera 90 : endif : if camera angle x()<-90 : xrotate camera -90 : endif : loop : endif : if forward$="mid" or forward$="midi" or forward$="mp3" or forward$="sgt" : load music path$,1
loop music 1 : exit prompt "Music Successfully Listened To","Done" : wait key : end : endif : if forward$="aiff" or forward$="au" or forward$="snd" or forward$="wav" : load sound path$,1 : loop sound 1 : exit prompt "Sound Successfully Heard","Done" : wait key : end : endif : endif : loop
