Quote: "Clicking on My Documents or Desktop I receive the error path does not exist."
Yeah, those paths are taken from the registry. Since you get a severe exception when trying to read from the registry, you have to rem it out, thus losing those lines. I am going to try to fix it now.
[EDIT]
Ok, I think that I fixed it to work with windows 98, tested it out and it works fine. Let me know if it still give you trouble Latch and thanks for all the feedback! BTW, does the clicking work now? I know that it was giving you trouble, accessing the file next to the one you click, so I completely re-wrote a couple subroutines.
[EDIT 2] Added color changing options (click the options button, click the squares and press enter). Also you can now use background music (just click a music or sound file and it will loop). The music/sound will stop when you press backspace.
Should work with windows 9x and computers with a main drive other than C:
set display mode 640,480,32
set window on
set window size 700,550
set window layout 1,1,0
set window title "BN2'S File scanner"
`image list:
`1=Back
`2=folder button
`3=Picture button
`4=Text Button
`5=object button
`6=sound button
`7=video button
`8-13=c,a,d,e,f,g
`14-17=quick buttons
`18=Back arrow
`19=up
`20=down
`21-24 highlights (drive,button,icon,small)
`25=mouse
`48=Drive
`49=EXE
`50=text
`78=Window
`1000=Main GUI
drive$=upper$(left$(get dir$(),1))
sync on
hide mouse
if path exist(drive$+":WINDOWSDesktop")=1
desktop$=drive$+":WINDOWSDesktop"
document$=drive$+":My Documents"
else
` document$=getreg$("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders","Personal",drive$)
` desktop$=getreg$("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders","Desktop",drive$)
desktop$="C:UsersChris BullockDesktop"
endif
dim hotspots(700,500)
gosub makehotspots
show mouse
dim maincolor(4)
dim quickrgb1(4)
dim quickrgb2(4)
dim background(4)
color1=1
color2=1
color3=1
color4=1
quickrgb1(1)=rgb(243,203,141)
quickrgb2(1)=rgb(234,155,38)
maincolor(1)=rgb(0,127,50)
background(1)=rgb(0,0,0)
quickrgb1(2)=rgb(127,5,5)
quickrgb2(2)=rgb(255,5,5)
maincolor(2)=rgb(255,5,5)
background(2)=rgb(0,0,0)
quickrgb1(3)=rgb(5,127,5)
quickrgb2(3)=rgb(5,255,5)
maincolor(3)=rgb(5,255,5)
background(3)=rgb(0,0,0)
quickrgb1(4)=rgb(5,5,127)
quickrgb2(4)=rgb(5,5,255)
maincolor(4)=rgb(5,5,255)
background(4)=rgb(0,0,0)
gosub generategui
gosub makebuttons
sprite 11,0,1000,2
sprite 12,0,1000,3
sprite 13,0,1000,4
sprite 14,0,1000,5
sprite 15,0,1000,6
sprite 16,0,1000,7
sprite 17,0,1000,8
sprite 18,0,1000,49
set text font "arial",1
`background
sprite 1000,640,480,1
gosub assemblefiles
dim files(4000)
sprite 1,1000,1000,1000
set current bitmap 0
gosub options
set text font "arial",1
do
set text font "arial",1
` text 320,240,str$(col)
if backspacekey()=1 and music exist(1)=1
if music playing(1)
stop music 1
endif
delete music 1
endif
if backspacekey()=1 and sound exist(1)=1
if sound playing(1)
stop sound 1
endif
delete sound 1
endif
gosub makeui
ink 0,0
box 100,90,639,479
if fileoffset<0 then fileoffset=0
paste sprite 1,100,90-fileoffset
ink rgb(255,255,255),0
draw to front
sprite 2,mousex(),mousey(),25
set sprite 2,1,0
sprite 100,2000,2000,21
ink rgb(0,0,255),0
box 150,71,600,83
ink rgb(255,255,255),0
sprite 2,mousex(),mousey(),25
draw to front
text 150,71,upper$(get dir$())
paste sprite 1000,0,0
set text size 24
text 10,10,get date$()
text 10,30,get time$()
set text size 12
gosub button_check
if upkey()=1 or scancode()=201
dec fileoffset,2
endif
if downkey()=1 or scancode()=209
inc fileoffset,2
endif
sync
cls
loop
end
generategui:
` ink rgb(255,255,50),0
ink maincolor(color1),0
` ink rgb(255,255,255),0
box 0,0,100,479
box 0,0,639,70
box 100,70,150,120
ink rgb(0,0,255),0
box 628,71,639,479
ink 0,0
fill(100,70,150,120,150,120,49,background(color4))
get image 1,0,0,640,480
cls
return
button_check:
col=sprite collision(2,0)
select col
case 0: if sprite exist(100) then hide sprite 100 : endcase
case 3: show sprite 100: sprite 100,sprite x(col),sprite y(col),21 : endcase
case 4: show sprite 100: sprite 100,sprite x(col),sprite y(col),21 : endcase
case 5: show sprite 100: sprite 100,sprite x(col),sprite y(col),21 : endcase
case 6: show sprite 100: sprite 100,sprite x(col),sprite y(col),21 : endcase
case 7: show sprite 100: sprite 100,sprite x(col),sprite y(col),22 : endcase
case 8: show sprite 100: sprite 100,sprite x(col),sprite y(col),22 : endcase
case 9: show sprite 100: sprite 100,sprite x(col),sprite y(col),22 : endcase
case 10: show sprite 100: sprite 100,sprite x(col),sprite y(col),22 : endcase
`sprite 100,sprite x(col),sprite y(col),col+18
endselect
if mouseclick()=1
hide sprite 100
select col
case 3
if path exist("C:")
cd "C:"
fileoffset=0
gosub assemblefiles
endif
endcase
case 4
if path exist("D:")
cd "D:"
fileoffset=0
gosub assemblefiles
endif
endcase
case 5
if path exist("A:")
cd "A:"
fileoffset=0
gosub assemblefiles
endif
endcase
case 6
if path exist("E:")
cd "E:"
fileoffset=0
gosub assemblefiles
endif
endcase
case 7
fileoffset=0
gosub mycomputer
endcase
case 8
cd document$
fileoffset=0
gosub assemblefiles
endcase
case 9
fileoffset=0
endcase
case 10
cd desktop$
fileoffset=0
gosub assemblefiles
endcase
case 101: set dir "../" : gosub assemblefiles : fileoffset=0 : endcase
case 102: dec fileoffset,80 : endcase
case 103: inc fileoffset,80 : endcase
case 51: gosub options : endcase
case default: gosub filehandler: endcase
endselect
wait 300
endif
return
makehotspots:
Text 0,0,"Loading"
create bitmap 2,700,500
color=11
starty=83
for y=1 to 5
startx=125
color=1+10*y
for x=1 to 5
ink rgb(color,5,5),0
box startx,starty,startx+100,starty+80
inc color
inc startx,100
sync
next x
inc starty,80
next y
ink rgb(255,255,255),0
starty=startx=0
set current bitmap 2
for boxy=0 to 4
starty=boxy*81
for boxx=0 to 4
startx=boxx*100
color=rgbr(point(startx+125,starty+83))
for y=0 to 80
for x=0 to 100
hotspots(x+startx+125,y+starty+83)=color
next x
next y
next boxx
next boxy
set current bitmap 0
return
assemblefiles:
ink rgb(255,255,255),0
set current bitmap 1
cls
startx=25
starty=0
x=startx
y=starty
count=0
type=0
imgnum=0
filename$=""
empty checklist
perform checklist for files
totalfiles=checklist quantity()
find first
for i=1 to totalfiles
if get file name$()<>"." and get file name$()<>".."
filename$=get file name$()
type=typehandler(filename$)
select type
case 1 : imgnum=2 : sprite=11 : endcase
case 2 : imgnum=3 : sprite=12 : endcase
case 3 : imgnum=4 : sprite=13 : endcase
case 4 : imgnum=5 : sprite=14 : endcase
case 5 : imgnum=6 : sprite=15 : endcase
case 6 : imgnum=7 : sprite=16 : endcase
case 7 : imgnum=5 : sprite=14 : endcase
case 8 : imgnum=49 : sprite=18 : endcase
case default : imgnum=49 : sprite=18 : endcase
endselect
paste sprite sprite,x,y
center text x+sprite width(sprite)/2,y+65,filename$
inc x,100
inc count
if count=5
count=0
inc y,80
x=startx
endif
endif
` if get file type()<>-1
find next
` endif
next i
get image 1000,0,0,550,4000
set current bitmap 0
filename$=""
imgnum=0
sprite=0
type=0
return
filehandler:
if hotspots(mousex(),mousey())<>0
hotspot=hotspots(mousex(),mousey())
y=(hotspot/10)-1
x=hotspot-10*(y+1)
x=x+5*y+5*(fileoffset/80)
perform checklist for files
if (x-1)<=checklist quantity()
find first
if get file name$()="."
find next
find next
endif
if x>1
for i=1 to x-1
if get file type()<>-1
find next
endif
next i
endif
name$=get file name$()
type=typehandler(get file name$())
select type
case 1 : gosub pictures : endcase
case 2 : gosub handletext : endcase
case 3 : gosub object : endcase
case 4 : gosub sound : endcase
case 5 : gosub video : endcase
case 6 : if path exist(name$)=1 then cd name$ : gosub assemblefiles : endcase
case 7 : gosub music : endcase
case 8 : gosub exe : endcase
endselect
fileoffset=0
endif
endif
return
pictures:
if file exist(name$)
load image name$,567
sprite 567,0,0,567
set sprite 567,1,0
max#=320.0
repeat
if upkey()=1 : if 240>=cy: inc cy : endif : endif
if downkey()=1 : if cy>=-240 : dec cy : endif : endif
if leftkey()=1 and 320>=cx then inc cx
if rightkey()=1 and cx>=-320 then dec cx
if inkey$()="+" then inc max#,10.0
if inkey$()="-" then dec max#,10.0
if max#<=0.0 then max#=10.0
ink rgb(255,255,255),0
width#=sprite width(567)
scale#=max#/width#
scale sprite 567,scale#*100
sprite 567,320-(sprite width(567)/2)+cx,240-(sprite height(567)/2)+cy,567
sync
scale sprite 567,100
until returnkey()=1
delete sprite 567
delete image 567
endif
return
object:
if file exist(name$)
backdrop on
load object name$,1
repeat
turn object right 1,1
sync
until scancode()<>0
delete object 1
backdrop off
endif
return
video:
if file exist(name$)
load animation name$,1
makewindow(animation width(1)+10,animation height(1)+10,320,240,quickrgb1(color2),quickrgb2(color3))
play animation 1,320-(animation width(1)/2),240-(animation height(1)/2)
loop animation 1
repeat
sync
until scancode()<>0
delete animation 1
endif
delete sprite 54
return
sound:
if file exist(name$)
if sound exist(1)
if sound playing(1)
stop sound 1
endif
delete sound 1
endif
load sound name$,1
play sound 1
loop sound 1
endif
return
music:
if file exist(name$)
if music exist(1)
if music playing(1)
stop music 1
endif
delete music 1
endif
load music name$,1
play music 1
loop music 1
endif
return
exe:
if file exist(name$)
execute file name$,"",""
endif
return
`---------------------------------------------------
handletext:
if file exist(name$)
open to read 1,name$
create bitmap 3,1000,10001
` set current bitmap 3
repeat
read string 1,line$
print line$
until file end(1)=1
`----------------------------------------------------------------------------------------------
get image 50,0,0,1000,10000
sprite 50,0,4000,50
repeat
set current bitmap 0
ink 0,0
box 125,80,639,479
ink rgb(255,255,255),0
paste sprite 50,125-offsetx,83-offsety
gosub makeui
if upkey()=1 then dec offsety,12
if downkey()=1 then inc offsety,12
if offsety<0 then offsety=0
if rightkey()=1 then inc offsetx,5
if leftkey()=1 then dec offsetx,5
if offsetx<0 then offsetx=0
sync
cls
until returnkey()=1
close file 1
cls
endif
return
makeui:
`c:
sprite 3,150,5,8
`d:
sprite 4,250,5,9
`a:
sprite 5,350,5,10
`e:
sprite 6,450,5,11
i=100
`My Comp
sprite 7,1,110+i,14
`MY DOCUMENTS
sprite 8,1,140+i,15
`CONTROL PANEL
sprite 9,1,170+i,16
`DESKTOP
sprite 10,1,200+i,17
`back arrow
sprite 101,600,71,18
`up arrow
sprite 102,628,71,19
`down arrow
sprite 103,628,468,20
`options
sprite 51,560,50,51
paste sprite 1000,0,0
return
mycomputer:
dim drive$(5,5)
x=50
y=0
x2=1
y2=1
count=0
ink 0,0
set current bitmap 1
cls
ink rgb(255,255,255),0
for i=97 to 123
if path exist(chr$(i)+":")
sprite 8+i,640,480,48
if count=5
y=y+80
count=0
x=50
x2=0
inc y2
endif
paste sprite 8+i,x,y
inc count
center text x+sprite width(8+i)/2,y+sprite height(8+i),chr$(i)
inc x,100
drive$(x2,y2)=chr$(i)+":"
inc x2
endif
next i
get image 1000,0,0,550,4000
set current bitmap 0
gosub mycomploop
return
mycomploop:
sprite 1,1000,0,1000
set current bitmap 0
repeat
ink 0,0
box 120,83,639,479
ink rgb(255,255,255),0
paste sprite 1,125,83
gosub makeui
if mouseclick()=1
if hotspots(mousex(),mousey())<>0
hotspot=hotspots(mousex(),mousey())
cy=(hotspot/10)
cx=hotspot-10*(cy)
cd drive$(cx,cy)
exitflag=1
endif
endif
sync
until exitflag=1
exitflag=0
gosub generategui
gosub assemblefiles
return
options:
makewindow(166,166,320,240,quickrgb1(color2),quickrgb2(color3))
ink rgb(5,5,5),0
text 245,163,"Primary Color"
text 245,203,"Button Color 1"
text 245,243,"Button Color 2"
text 245,283,"Background Color"
ink rgb(5,5,5),0
for x=0 to 3
ink 0,0
box 265+30*x,178,285+30*x,198
box 265+30*x,218,285+30*x,238
box 265+30*x,258,285+30*x,278
box 265+30*x,298,285+30*x,318
ink maincolor(x+1),0
box 267+30*x,180,283+30*x,196
ink quickrgb1(x+1),0
box 267+30*x,220,283+30*x,236
ink quickrgb2(x+1),0
box 267+30*x,260,283+30*x,276
ink background(x+1),0
box 267+30*x,300,283+30*x,316
next x
sync
gosub optionsloop
return
optionsloop:
set current bitmap 0
repeat
if mouseclick()=1
repeat
sync
until mouseclick()=0
color=point(mousex(),mousey())
`Changes the main color
if 198>=mousey() and mousey()>=178
select color
case maincolor(1) : color1=1 : endcase
case maincolor(2) : color1=2 : endcase
case maincolor(3) : color1=3 : endcase
case maincolor(4) : color1=4 : endcase
endselect
endif
`Changes Quickrgb1
if 236>=mousey() and mousey()>=220
select color
case quickrgb1(1) : color2=1 : endcase
case quickrgb1(2) : color2=2 : endcase
case quickrgb1(3) : color2=3 : endcase
case quickrgb1(4) : color2=4 : endcase
endselect
endif
`Changes Quickrgb2
if 276>=mousey() and mousey()>=260
select color
case quickrgb2(1) : color3=1 : endcase
case quickrgb2(2) : color3=2 : endcase
case quickrgb2(3) : color3=3 : endcase
case quickrgb2(4) : color3=4 : endcase
endselect
endif
endif
ink rgb(255,255,255),0
text 600,500,str$(color)
sync
until returnkey()=1
cls
delete sprite 54
gosub generategui
gosub makebuttons
return
makebuttons:
`FOLDER BUTTON
ink rgb(227,217,91),0
box 320,240,380,285
box 320,225,350,285
fill(320,225,380,285,350,240,16,rgb(227,217,91))
get image 7,320,225,380,285
cls
`PICTURE BUTTON
ink rgb(127,127,127),0
box 320,240,380,300
ink rgb(227,217,91),0
box 325,245,375,295
set text size 45
ink rgb(5,5,5),0
text 337,247,"P"
get image 2,320,240,380,300
cls
`TEXT BUTTON
ink rgb(127,127,127),0
box 320,240,380,300
ink rgb(230,230,255),0
box 330,245,370,295
ink rgb(5,5,5),0
line 335,255,365,255
line 335,270,365,270
line 335,285,365,285
get image 3,320,240,380,300
cls
`OBJECT BUTTON
ink rgb(127,127,127),0
box 320,240,380,300
ink rgb(227,217,91),0
box 325,245,375,295
set text size 45
ink rgb(5,5,5),0
text 337,247,"O"
get image 4,320,240,380,300
cls
`SOUND BUTTON
ink rgb(127,127,127),0
box 320,240,380,300
ink rgb(5,5,5),0
box 325,245,375,295
ink rgb(230,230,255),0
x=325
x2=325
y2#=270
for i=1 to 50
y#=sin(20*i)*20+270
line x,y#,x2,y2#
x2=x
y2#=y#
inc x,1
next x
get image 5,320,240,380,300
cls
`VIDEO BUTTON
ink rgb(127,127,127),0
box 320,240,380,300
ink rgb(227,217,91),0
box 325,245,375,295
set text size 45
ink rgb(5,5,5),0
text 337,247,"V"
get image 6,320,240,380,300
cls
`DRIVE BUTTONS
ink quickrgb1(color2),0
box 100,100,400,166
ink quickrgb2(color3),0
box 105,105,195,128
box 205,105,295,128
box 305,105,395,128
box 105,138,195,161
box 205,138,295,161
box 305,138,395,161
ink rgb(5,5,5),0
set text size 24
center text 150,108,"C:"
center text 250,108,"D:"
center text 350,108,"A:"
center text 150,141,"E:"
center text 250,141,"F:"
center text 350,141,"G:"
get image 8,100,100,200,133
get image 9,200,100,300,133
get image 10,300,100,400,133
get image 11,100,133,200,166
get image 12,200,133,300,166
get image 13,300,133,400,166
cls
`QUICK BUTTONS
ink quickrgb1(color2),0
box 100,40,200,160
ink quickrgb2(color3),0
box 100,42,200,68
box 100,72,200,98
box 100,102,200,128
box 100,132,200,158
set text size 16
ink rgb(5,5,5),0
center text 150,45,"My Computer"
center text 150,75,"My Documents"
center text 150,105,"Control Panel"
center text 150,135,"Desktop"
get image 14,100,40,200,70
get image 15,100,70,200,100
get image 16,100,100,200,130
get image 17,100,130,200,160
cls
`OPTIONS BUTTON
set text font "Arial",1
set text size 12
ink quickrgb1(color2),0
box 0,0,51,15
ink quickrgb2(color3),0
box 2,2,48,12
ink rgb(5,5,5),0
center text 25,2,"Options"
get image 51,0,0,51,15
`----------------------------------------------------------------------------------------------
`<- BUTTON
set text font "arial",2
ink rgb(100,100,100),0
box 320,240,332,252
ink rgb(127,127,127),0
box 322,242,330,250
set text size 12
set text to bold
ink rgb(0,127,0),0
Center Text 326,241,chr$(215)
get image 18,320,240,332,252
cls
`/ Button
ink rgb(100,100,100),0
box 320,240,332,252
ink rgb(127,127,127),0
box 322,242,330,250
set text size 12
`set text to bold
ink rgb(5,5,5),0
Center Text 327,241,chr$(217)
get image 19,320,240,332,252
cls
`/ BUTTON
ink rgb(100,100,100),0
box 320,240,332,252
ink rgb(127,127,127),0
box 322,242,330,250
set text size 12
set text font "Arial",2
ink rgb(5,5,5),0
Center Text 327,241,chr$(218)
get image 20,320,240,332,252
cls
`EXE BUTTON
set text font "Arial",2
ink rgb(127,127,127),0
box 320,240,380,300
ink rgb(5,5,255),0
box 325,245,375,295
set text size 45
ink rgb(5,255,5),0
text 337,247,chr$(216)
get image 49,320,240,380,300
cls
`-------------------------------------------------------------------------------------------------------------------
`DRIVE ICON
ink rgb(127,127,127),0
box 320,240,380,300
ink rgb(255,255,255),0
box 325,245,375,295
set text font "Arial",2
set text size 72
ink 0,0
text 322,225,chr$(59)
get image 48,320,240,380,320
cls
`---------------------------------------------------------------------------------------------------------
`Button Highlights
create bitmap 1,640,4000
ink 0,rgb(255,255,255)
cls
ink 0,0
level#=250
count#=480*640*(level#/100)
for i=1 to count#
dot rnd(640),rnd(480)
next i
`quick drive highlights
get image 21,0,0,100,33
`quick button highlights
get image 22,320,240,420,270
`icon highlights
get image 23,40,60,100,120
`small highlights
get image 24,10,38,22,50
cls
set current bitmap 0
`MOUSE COLLISION BOX
ink 0,rgb(11,11,11)
cls
get image 25,320,240,322,242
ink rgb(255,255,255),0
set text size 12
return
function distance#(x,y,cx,cy)
r#=sqrt(abs(((cx-x)*(cx-x)+(cy-y)*(cy-y))))
endfunction r#
function fill(startx,starty,endx,endy,cx,cy,r,color)
ink color,0
for y=starty to endy
for x=startx to endx
if distance#(x,y,cx,cy)<=r
dot x,y
endif
next x
next y
endfunction
`CREATED BY: MadrMan March 5,2006
function getreg$(path$,key$,drive$)
c=0
a=0
d=0
aa=0
string$=""
stringb$=""
param$=""
if file exist(drive$+":reg.reg") then delete file drive$+":reg.reg"
reg$="/e "+drive$+":reg.reg "+chr$(34)+path$+chr$(34)
execute file "regedit.exe",reg$,""
repeat : a=a+1 : until file open(a)=0
length=len(chr$(34)+key$+chr$(34))
`----------------------------------------------------------------------------
repeat : c=c+1 : until file exist(drive$+":reg.reg")=1 or c=1000
if c=1000 then exitfunction
set dir drive$+":"
open to read a,"reg.reg"
repeat
read string a,string$
if mid$(string$,1)=mid$(key$,1)
repeat
read string 1,stringb$
string$=string$+stringb$
d=d+1
until d>length or string$=key$ or mid$(key$,d)<>mid$(string$,d)
d=0
if key$=string$
repeat
read string a,string$
if aa=2 and string$<>chr$(34) then param$=param$+string$
` if string$=chr$(34) then a=1
if string$=chr$(34) then aa=aa+1
until aa=4
endif
endif
until file end(a)=1 or lower$(left$(string$,length))=lower$(chr$(34)+key$+chr$(34)) or param$<>""
close file a
`para$=right$(string$,len(string$)-length)
if file exist(drive$+":reg.reg") then delete file drive$+":reg.reg"
endfunction param$
function typehandler(file$)
remstart
pics
bmp
png
jpg
text
txt
doc
object
3ds
x
sound
xm
wma
wav
mp3
video
avi
wmv
mpg
mpeg
remend
dim extension$(20)
`1
extension$(1)=".bmp"
extension$(2)=".png"
extension$(3)=".jpg"
`2
extension$(0)=".dba"
extension$(4)=".txt"
extension$(5)=".doc"
extension$(19)=".ini"
`3
extension$(6)=".3ds"
extension$(7)=".x"
`4
extension$(8)=".xm"
extension$(9)=".wma"
extension$(10)=".wav"
extension$(11)=".mp3"
`5
extension$(12)=".avi"
extension$(13)=".wmv"
extension$(14)=".mpg"
extension$(15)="mpeg"
`7
extension$(16)=".mid"
`8
extension$(17)=".exe"
`9
extension$(18)=".lnk"
ext$=right$(file$,4)
select lower$(ext$)
case extension$(0) : type=2 : endcase
case extension$(1) : type=1 : endcase
case extension$(2) : type=1 : endcase
case extension$(3) : type=1 : endcase
case extension$(4) : type=2 : endcase
case extension$(5) : type=8 : endcase
case extension$(6) : type=3 : endcase
case extension$(9) : type=4 : endcase
case extension$(10) : type=4 : endcase
case extension$(11) : type=4 : endcase
case extension$(12) : type=5 : endcase
case extension$(13) : type=5 : endcase
case extension$(14) : type=5 : endcase
case extension$(15) : type=5 : endcase
case extension$(16) : type=7 : endcase
case extension$(17) : type=8 : endcase
case extension$(18) : type=8 : endcase
case extension$(19) : type=2 : endcase
case default : type=0 : endcase
endselect
if lower$(right$(ext$,2))=extension$(7) then type=3
if lower$(right$(ext$,3))=extension$(8) then type=7
if type=0
find first
while get file name$()<>file$ and get file type()>-1
find next
endwhile
if get file type()<>-1
if get file type()=1
type=6
endif
endif
endif
if type=0 then type=8
endfunction type
function makewindow(width,height,x,y,color1,color2)
create bitmap 31,width+1,height+1
ink color1,color2
cls
box 3,3,width-3,height-3
get image 54,0,0,width,height
set current bitmap 0
sprite 54,1000,0,54
paste sprite 54,x-(width/2),y-(height/2)
delete bitmap 31
endfunction
function backspacekey()
endfunction keystate(14)
Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?