You need speech.dll and net_lib.dll
You can open any text file for viewing or have it read to you. You can view it with line numbers. You can edit the text however you like. To save it, right click in the console window, select all and copy. Press "save as" and enter the name of the file.
There's a filter for the reader, so it won't read things you don't want, like "/". There's no help file. You can make one with the program.
The only problem is that once it starts talking, it's difficult to get it to stop. You can pause it by right clicking on the console. Hold the enter key down or the stop button to stop it. It will finish reading the line.
remstart
Project: Console Editor with Speech for dbpro
by David Meurin
http://www.awfuldarkforest.com
You need dbp_netlib.dll and speech.dll
remend
set window on
set window size 320,240
set window title "dbreader"
set window position 700,0
sync on
sync rate 0
rem set home directory
homedir$=get dir$()
rem set reader to stopped
stop=1
rem dim the array to hold the text
dim magic$(3000)
con_StartConsole 0,0,"Reader",1,400,700
set text size 14
set text font "arial"
gosub filter
gosub main
main:
do
if t>2999 then t=0:stop=1
if returnkey()=1 then stop=1
if spacekey()=1 then t=t+10
rem start the reader, reading a line at a time
if stop=0
if len(magic$(t))>0
con_appendMessage magic$(t)
for x=1 to 15
magic$(t)=str_Replace(magic$(t),filter$(x)," ")
next x
print say(magic$(t),SPF_DEFAULT)
endif
endif
rem background
ink rgb(140,140,140),0
box 0,0,320,240
ink rgb(160,160,170),0
box 4,4,316,236
`stop reading
pre=butta(170,50,"stop ")
if pre=1
var=2
endif
if stop=0
ink rgb(255,0,0),0
text 170,50,"stop "
ink rgb(0,0,0),0
endif
if var=2 and mouseclick()=0
stop=1
var=0
endif
pre=butta(20,50,"open/read ")
if pre=1
var=1
endif
pre=butta(20,80,"read open ")
if pre=1
var=5
endif
pre=butta(170,80,"read open line ")
if pre=1
var=6
endif
pre=butta(20,110,"open/view ")
if pre=1
var=4
endif
pre=butta(170,110,"open/view num ")
if pre=1
var=3
endif
pre=butta(20,140,"save as ")
if pre=1
var=7
endif
pre=butta(170,140,"help ")
if pre=1
var=8
endif
`checking var, with no mouseclick, to prevent multiples
`help text
if var=8 and mouseclick()=0 and stop=1
set dir homedir$
undim magic$(3000)
dim magic$(3000)
if file exist("help.txt")=1
load array "help.txt",magic$(3000)
t=-1
endif
var=0
con_newmessage talk$
con_appendmessage " "
for t=0 to 3000
if len(magic$(t))>0
con_appendMessage magic$(t)
endif
next t
endif
`save as
if var=7 and mouseclick()=0 and stop=1
var=0
talka$=gen_savefiledialog(homedir$,"*.txt;*.html;*.dba|*.txt;*.html;*.dba")
if file exist(talka$)=1
delete file talka$
endif
dim file$(1)
file$(0)=get clipboard$()
save array talka$,file$(1)
undim file$(1)
endif
`read open
if var=5 and mouseclick()=0 and stop=1
var=0
if len(talk$)>0
stop=0
t=-1
con_newmessage talk$
con_appendmessage " "
endif
endif
`read open line number
if var=6 and mouseclick()=0 and stop=1
var=0
if len(talk$)>0
stop=0
t$=gen_inputbox("Reader","Input the line number to begin reading")
t=val(t$)-1
con_newmessage talk$
con_appendmessage " "
endif
endif
`begin reading
if var=1 and mouseclick()=0 and stop=1
var=0
talk$=gen_openfiledialog(homedir$,"*.*|*.*")
if len(talk$)>0
undim magic$(3000)
dim magic$(3000)
load array talk$,magic$(3000)
stop=0
t=-1
con_newmessage talk$
con_appendmessage " "
endif
endif
`open for viewing with numbers
if var=3 and mouseclick()=0 and stop=1
var=0
talk$=gen_openfiledialog(homedir$,"*.*|*.*")
if len(talk$)>0
undim magic$(3000)
dim magic$(3000)
load array talk$,magic$(3000)
con_newmessage talk$
con_appendmessage " "
for t=0 to 3000
if len(magic$(t))>0
con_appendMessage str$(t)+" "+ magic$(t)
endif
next t
endif
endif
`open for viewing
if var=4 and mouseclick()=0 and stop=1
var=0
talk$=gen_openfiledialog(homedir$,"*.*|*.*")
if len(talk$)>0
undim magic$(3000)
dim magic$(3000)
load array talk$,magic$(3000)
con_newmessage talk$
con_appendmessage " "
for t=0 to 3000
if len(magic$(t))>0
con_appendMessage magic$(t)
endif
next t
endif
endif
`increase t by 1 to keep the motor running
inc t,1
sync
loop
return
rem the filter to keep the reader from reading some things
filter:
dim filter$(15)
filter$(0)="#"
filter$(1)="<"
filter$(2)=">"
filter$(3)="/"
filter$(4)="\"
filter$(5)=")"
filter$(6)="("
filter$(7)="`"
filter$(8)="~"
filter$(9)="]"
filter$(10)="["
filter$(11)="-"
filter$(12)=":"
filter$(13)=";"
filter$(14)="_"
filter$(15)="rem"
return
rem the button function
function butta(xpos,ypos,talk$)
lon=120
if pre=0 then ink rgb(180,180,160),0
if mousex()>xpos and mousex()<xpos+lon and mousey()>ypos and mousey()<ypos+20
ink rgb(200,200,180),0
if mouseclick()=1 then pre=1
endif
box xpos-5,ypos-3,xpos+lon,ypos+16
if pre=0 then ink rgb(40,40,80),0
if pre=1 then ink rgb(220,220,220),0
line xpos-5,ypos+16,xpos+lon,ypos+16:line xpos+lon,ypos-3,xpos+lon,ypos+16
if pre=1 then ink rgb(40,40,80),0
if pre=0 then ink rgb(220,220,220),0
line xpos-5,ypos-3,xpos+lon,ypos-3:line xpos-5,ypos-3,xpos-5,ypos+16
ink rgb(0,0,0),0
alon=int(len(talk$)*3)
alon=60-alon
xpos=xpos+alon
text xpos,ypos,talk$
endfunction pre
Awfuldark Forest