close all clear all on escape cancel set century on set confirm on if iscolor() set color on else set color off endif clear set color to n/bg,n/g,g clear set date german set decimals to 7 set exact on set function 1 to set function 2 to set function 3 to set function 4 to set function 5 to set function 6 to set function 7 to set function 8 to set function 9 to set function 10 to set heading on set safety off set status off set talk off set typeahead to 3000 retn = "return" clear nnn = 1 do while nnn <= 28 ?space(80) nnn = nnn + 1 enddo nnn = row() if nnn <= 27 @ 7,60 say " " on escape store 27 to nnn * on escape cancel endif clear pic = " " @ 11,11 say " " get pic Picture '@*B ok.gif' size 2,8 @ 11,26 say " " get pic Picture '@*B cancel.gif' size 2,12 clear gets set color to bg+/bg,n/g,g @ 14, 4 say "May specify output editor:" @ 14,31 say "WordPad" style "u" @ 14,40 say "Notepad-HTML" style "u" @ 16, 4 say "Word-Text" style "u" @ 16,15 say "Word-HTML" style "u" @ 16,26 say "FrontPage" style "u" @ 16,37 say "IExplorer" style "u" set color to b/bg,n/g,g @ 16,48 say "None" style "u" set color to bg+/bg,n/g,g @ 1,0 say " " ?" Get ready now to paste your text to be symbolized!" set color to n/bg,n/g,g ? ?" (To symbolize differently, text-edit Symbolizer.dat)" ? ?" (To have two paragraphs distinguished in the output" ?" file, keep a blank line amidst them in pasted input)" ? ?" Press Enter or Click OK when you're ready.... " opt = inkey(90,'mh') editor = "NT" if opt = 0 &retn endif if opt = 27 &retn endif if opt = 151 if (mrow() > 11 .and. mrow() < 13 .and. mcol() > 26 .and. mcol() < 43) &retn endif if (mrow() > 13.8 .and. mrow() < 15.4 .and. mcol() > 30.8 .and. mcol() < 38.2) editor = "WP" endif if (mrow() > 13.8 .and. mrow() < 15.4 .and. mcol() > 39.8 .and. mcol() < 52.2) editor = "NH" endif if (mrow() > 15.8 .and. mrow() < 17.4 .and. mcol() > 3.8 .and. mcol() < 13.2) editor = "WT" endif if (mrow() > 15.8 .and. mrow() < 17.4 .and. mcol() > 14.8 .and. mcol() < 24.2) editor = "WH" endif if (mrow() > 15.8 .and. mrow() < 17.4 .and. mcol() > 25.8 .and. mcol() < 35.2) editor = "FP" endif if (mrow() > 15.8 .and. mrow() < 17.4 .and. mcol() > 36.8 .and. mcol() < 46.2) editor = "IE" endif if (mrow() > 15.8 .and. mrow() < 17.4 .and. mcol() > 47.8 .and. mcol() < 52.2) editor = "NN" endif endif @ 1,0 clear if .not. file("Close_me1.dbf") use symboliz copy to "Close_me1.dbf" use endif if .not. file("sl_data.dbf") use sl_dat copy to "sl_data.dbf" use endif if .not. file("sl_lines.dbf") use sl_line copy to "sl_lines.dbf" use endif if .not. file("symbol_htm.dbf") use symbl_htm copy to "symbol_htm.dbf" use endif if .not. file("Close_me2.dbf") use sl_font copy to "Close_me2.dbf" use endif select 1 use Close_me1 if file("symbolizer.dat") zap append from "symbolizer.dat" delimited with blank endif if reccount() < 1 append blank endif select 2 use sl_data if file("Paste_text_and_close.txt") erase "Paste_text_and_close.txt" endif modify file "Paste_text_and_close.txt" zap if file("Paste_text_and_close.txt") append from "Paste_text_and_close.txt" sdf erase "Paste_text_and_close.txt" else pic = " " @ 10,20 say " " get pic Picture '@*B ok.gif' size 2,8 clear gets @ 3,0 say " " ?" You should have pasted your text just before!" ? ?" After pasting, you must also get the file saved!" ? ?" Press any key, Click mouse or Wait to exit... " out = inkey(60,'mh') &retn endif if reccount() < 1 append blank endif count for rtrim(lostpart) <> "" to badlines if badlines > 0 clear replace dots with "...." all set color to r/bg,n/g,g set heading off list off lostpart + dots for len(trim(lostpart)) > 0 set heading on set color to n/bg,n/g,g ? " Some lines of the pasted text were longer than 4000" ? " columns, and their right parts as shown above, will" ? " unfortunately be missing in the output text!" ? ? " To correct this, you may break any such too long" ? " paragraph into smaller parts (as a para behaves as" ? " a line in the pasted text), even in the pasted text!" ? ? " Press Enter or Click OK to ignore and proceed... " ? ? ? nrow = row() - 1 @ nrow,8 say " " get pic Picture '@*B ok.gif' size 2,8 @ nrow,23 say " " get pic Picture '@*B cancel.gif' size 2,12 clear gets opt = inkey(90,'mh') clear if opt = 27 &retn endif if opt = 151 if (mrow() > nrow .and. mrow() < (nrow+2) .and. mcol() > 23 .and. mcol() < 40) &retn endif endif endif select 3 use sl_lines zap select 2 go top do while .not. eof() syl_rn = recno() newline = line01 select 3 append blank replace lines with newline select 2 go syl_rn if rtrim(line02) <> "" oldline = newline newline = line02 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line03) <> "" oldline = newline newline = line03 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line04) <> "" oldline = newline newline = line04 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line05) <> "" oldline = newline newline = line05 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line06) <> "" oldline = newline newline = line06 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line07) <> "" oldline = newline newline = line07 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line08) <> "" oldline = newline newline = line08 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line09) <> "" oldline = newline newline = line09 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line10) <> "" oldline = newline newline = line10 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line11) <> "" oldline = newline newline = line11 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line12) <> "" oldline = newline newline = line12 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line13) <> "" oldline = newline newline = line13 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line14) <> "" oldline = newline newline = line14 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line15) <> "" oldline = newline newline = line15 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line16) <> "" oldline = newline newline = line16 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line17) <> "" oldline = newline newline = line17 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line18) <> "" oldline = newline newline = line18 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line19) <> "" oldline = newline newline = line19 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn if rtrim(line20) <> "" oldline = newline newline = line20 if (right(oldline,1) <> " " .and. left(newline,1) <> " ") rt_spc = at(" ",newline) rt_begn = left(newline,rt_spc-1) newline = right(newline,len(newline)-rt_spc) oldline = stuff(oldline,len(oldline)+1,rt_spc-1,rt_begn) endif select 3 go bottom replace lines with oldline append blank replace lines with newline endif select 2 go syl_rn skip enddo select 3 use select 2 use sl_lines select 1 replace key_combi with ltrim(key_combi) all replace lntrkc_ with ( len(key_combi) - len(trim(key_combi)) ) all sort on lntrkc_ , key_combi to symsortd zap append from symsortd erase "symsortd.dbf" delete for trim(key_combi) = "" all delete for trim(turn_into) = "" all pack browse fields key_combi, turn_into delete for trim(key_combi) = "" all delete for trim(turn_into) = "" all pack rect = reccount() go top do while .not. eof() rn1 = recno() @ 3,0 say " " ?" Percent complete:",str(round((rn1-1)/rect,0),3)+"%"," (Press Esc to cancel)" ky_cmb = ltrim(rtrim(key_combi)) trn_nto = ltrim(rtrim(turn_into)) select 2 faund = .t. do while faund locate for ky_cmb $ lines faund = found() if faund atk = at(ky_cmb,lines) leftpart = left(lines,atk-1) midpart = trn_nto rightpart = right(lines,len(lines)-(atk-1)-len(ky_cmb)) line_n = stuff(leftpart,len(leftpart)+1,len(trn_nto),trn_nto) line_n = stuff(line_n,len(line_n)+1,len(rightpart),rightpart) replace lines with line_n endif enddo select 1 go rn1 skip enddo select 1 @ 3,0 clear ?" Renewing Symbolizer.dat .... " set console off set alternate to "symbolizer.dat" set alternate on go top do while .not. eof() ?ltrim(rtrim(key_combi)),ltrim(rtrim(turn_into)) skip enddo ? set alternate off close alternate set console on use Close_me2 replace choos_font with "" for recno() = 1 sort on choos_font /c to fontsort zap append from fontsort erase "fontsort.dbf" replace sl with recno() all replace choos_font with "[None]" for recno() = 1 go top browse fields sl, choos_font freeze choos_font font_chsn = ltrim(rtrim(choos_font)) recall all if lower(font_chsn) = "[none]" font_chsn = "" endif select 2 @ 3,0 clear ?" Preparing the text output text.txt .... " set console off set alternate to "Text last symbolized.txt" set alternate on go top do while .not. eof() ?rtrim(lines) skip enddo ? set alternate off close alternate set console on @ 3,0 clear ?" Preparing the HTML output text.htm .... " select 1 use symbol_htm go top do while .not. eof() rn1 = recno() ky_cmb = ltrim(rtrim(key_combi)) trn_nto = ltrim(rtrim(turn_into)) if ky_cmb = "&" ky_cmb = "& " endif select 2 faund = .t. do while faund locate for ky_cmb $ lines faund = found() if faund atk = at(ky_cmb,lines) leftpart = left(lines,atk-1) midpart = trn_nto rightpart = right(lines,len(lines)-(atk-1)-len(ky_cmb)) line_n = stuff(leftpart,len(leftpart)+1,len(trn_nto),trn_nto) line_n = stuff(line_n,len(line_n)+1,len(rightpart),rightpart) replace lines with line_n endif enddo select 1 go rn1 skip enddo select 2 replace lines with "

" for rtrim(lines) = "" all set console off set alternate to "Text last symbolized.htm" set alternate on ?"" ?"" ?"Your symbolized text" ?"" ?"" if len(font_chsn) > 0 ?"" endif if editor = "NN" ?"" endif go top do while .not. eof() ?rtrim(lines) skip enddo if len(font_chsn) > 0 ?"" endif if editor = "NN" ?"" endif ?"

" ?"" ?"" ? set alternate off close alternate set console on @ 3,0 clear ?" Searching for the text-editors' locations .... " rect = reccount() text_0 = left( dbf(), len( dbf() ) - 12 ) use text_txt = stuff(text_0,len(text_0)+1,24,"Text last symbolized.txt") text_htm = stuff(text_0,len(text_0)+1,24,"Text last symbolized.htm") drv_num = asc("A") store "" to Int_Exp, MS_Word, MS_FP, MS_Fxpr do while drv_num <= asc("Z") drv = stuff(chr(drv_num),2,1,":") if drive("&drv") = 3 IExp_test = stuff(drv,3,45,"\Program Files\Internet Explorer\IExplore.exe") MSW1_test = stuff(drv,3,50,"\Program Files\Microsoft Office\Office\WinWord.exe") MSW2_test = stuff(drv,3,52,"\Program Files\Microsoft Office\Office10\Winword.exe") MFP1_test = stuff(drv,3,50,"\Program Files\Microsoft Office\Office\FrontPg.exe") MFP2_test = stuff(drv,3,52,"\Program Files\Microsoft Office\Office10\FrontPg.exe") Fxpr_test = stuff(drv,3,49,"\Program Files\FrontPage Express\Bin\FPXpress.exe") if file("&IExp_test") Int_Exp = IExp_test int_fold = left( int_exp, len(int_exp) - len("\IExplore.exe") ) endif if file("&MSW1_test") MS_Word = MSW1_test MSW_fold = left( MS_Word, len(MS_Word) - len("\WinWord.exe") ) endif if file("&MSW2_test") MS_Word = MSW2_test MSW_fold = left( MS_Word, len(MS_Word) - len("\WinWord.exe") ) endif if file("&MFP1_test") MS_FP = MFP1_test MFP_fold = left( MS_FP, len(MS_FP) - len("\FrontPg.exe") ) endif if file("&MFP2_test") MS_FP = MFP2_test MFP_fold = left( MS_FP, len(MS_FP) - len("\FrontPg.exe") ) endif if file("&Fxpr_test") MS_Fxpr = Fxpr_test FXp_fold = left( MS_Fxpr, len(MS_Fxpr) - len("\FPXpress.exe") ) endif endif drv_num = drv_num + 1 enddo @ 3,0 clear ?" Ordering the text-editor to show text .... " If editor = "NT" run notepad "&text_txt" Else Do case case len(MS_FP) > 0 .and. editor = "FP" cd "&MFP_fold" run FrontPg "&text_htm" case len(MS_Fxpr) > 0 .and. editor = "FP" cd "&FXp_fold" run FPXpress "&text_htm" case len(MS_Word) > 0 .and. editor = "WH" cd "&MSW_fold" run WinWord "&text_htm" case len(MS_Word) > 0 .and. editor = "WT" cd "&MSW_fold" run WinWord "&text_txt" case len(Int_Exp) > 0 .and. editor = "IE" cd "&Int_fold" run Iexplore "&text_htm" case editor = "WP" run write "&text_txt" case editor = "NH" run notepad "&text_htm" case editor = "NN" modify file "&text_txt" case rect > 600 run write "&text_txt" otherwise run notepad "&text_txt" Endcase Endif close all clear all clear quit