I tried it but it still didnt work. Let me explain again as I didnt do a very good job last time. If you type in one of your windows untill a horizonral scroll bar forms and then backspace untill the cursor goes off the window you get an error. Also I fixed a few things in mine and added a few features my favorite is the definition. Highlight a word and then goto file definition, I also added two buttons to make a selection all caps or all lowercase. Coppy, Cut and Paste now work between programs. You can now also put in special characters.
sync on
sync rate 100
set text font "Fixedsys",1
set text size 20
global dim folder$(600)
global dropdown
global t
global add
global cut
global coppy
global fontnumber
global keypress$
global menuscroll
fontnumber=1
global paste
global scroll3
add=3
cls
color backdrop rgb(100,100,100)
dim letter$(100000)
dim letter2$(100000,1)
dim hilighting(100000)
dim coppy$(1000)
syn=1000
set image colorkey 255,0,255
ink rgb(255,0,255),rgb(255,0,255)
box 0,0,10,20
ink 0,0
line 5,0,5,20
line 0,0,10,0
line 0,20,10,20
get image 1,0,0,10,21
gosub fontfacing
backspace=200
keypress$=""
lastchar=(screen width()-400)/text width("a")
oldcursor=5
set window size 800,600
do
scroll2=mousemovez()/120
spacebar=spacekey()
backkey=keystate(14)
theight=text height("a")
scroll=scroll+scroll2*theight+scroll3*theight
cursor=cursor-lastchar*(scroll3+scroll2)
if cursor>i
for j=i to cursor
letter$(j)=" "
next j
i=cursor
endif
scroll3=0
if scroll>0 then scroll=0
twidth=text width("a")
lastrow=scroll+650
keypress$=entry$()
clear entry buffer
if asc(keypress$)>32 and spacebar=1 then goto nocheck
write:
if keypress$=key$
if keypress$=""
else
held=held+1
if held>7500
letter$(cursor)=letter$(cursor)+keypress$
wait 5
i=i+1
cursor=cursor+1
if cursor<i
for j=i to cursor step -1
letter$(j+1)=letter$(j)
next j
endif
endif
endif
else
held=0
a=asc(keypress$)
if a>32
if cursor<i
for j=i to cursor step -1
letter$(j+1)=letter$(j)
next j
endif
letter$(cursor)=keypress$
i=i+1
cursor=cursor+1
endif
endif
nocheck:
if asc(keypress$)>32
key$=keypress$
else
key$=""
endif
if spacebar=1 then key$=" "
if spacebar=1 and spaceagain=0
if i>cursor
for j=i to cursor step -1
letter$(j+1)=letter$(j)
next j
spaceagain=1
letter$(cursor)=" "
i=i+1
cursor=cursor+1
else
spaceagain=1
letter$(cursor)=" "
i=i+1
cursor=cursor+1
endif
endif
if spacebar=0 then spaceagain=0
if returnkey()=1
cursor=cursor+lastchar
if cursor>i
for j=i to cursor
letter$(j)=" "
next j
i=cursor
else
i=i+lastchar
endif
wait 200
endif
if cursorchange>0
if backkey=1 and back=0 and i>0
if cursor>oldcursor
for j=oldcursor to i
letter$(j)=letter$(j+cursorchange)
next j
for j=i-cursorchange to i
letter$(j)=""
next j
cursor=cursor-cursorchange
oldcursor=cursor
i=i-cursorchange
if i<0 then i=0
if cursor<0 then cursor=0
cursorchange=0
back=1
wait 200
endif
if cursor<oldcursor
for j=cursor to i
letter$(j)=letter$(j+cursorchange)
next j
for j=i-cursorchange to i
letter$(j)=""
next j
cursorchange=0
back=1
wait 200
endif
endif
endif
if backkey=1 and i>0 and cursor>0 and back=0 or backspace<1 and i>0 and cursor>0
back=1
i=i-1
cursor=cursor-1
letter$(cursor)=""
if cursor<i
for j=cursor to i
letter$(j)=letter$(j+1)
next j
endif
if backspace<1 then wait 5
endif
if backkey=1 then backspace=backspace-1
if backkey=0 then backspace=7500:back=0
if controlkey()=1 then ctrl=1
if controlkey()=0 then ctrl=0
if ctrl=1 and keystate(45)=1
cut:
cop=0
if oldcursor>cursor then c1=cursor:c2=oldcursor
if oldcursor<cursor then c2=cursor:c1=oldcursor
clipcop$=""
for j=c1 to c2-1
coppy$(cop)=letter$(j)
clipcop$=clipcop$+coppy$(cop)
cop=cop+1
next j
write to clipboard clipcop$
for j=c2 to i
letter$(j-cop)=letter$(j)
if j>i-cop then letter$(j)=""
next j
i=i-cop
if i<0 then i=0
cursor=cursor-cop
if cursor<0 then cursor=0
wait 200
endif
cut=0
if ctrl=1 and keystate(46)=1
coppy:
cop=0
if oldcursor>cursor then c1=cursor:c2=oldcursor
if oldcursor<cursor then c2=cursor:c1=oldcursor
clipcop$=""
for j=c1 to c2-1
coppy$(cop)=letter$(j)
clipcop$=clipcop$+coppy$(cop)
cop=cop+1
next j
write to clipboard clipcop$
wait 200
endif
coppy=0
if ctrl=1 and keystate(47)=1
paste:
for j=i to cursor step -1
letter$(j+cop)=letter$(j)
next j
paste$=get clipboard$()
for j=cursor to cursor+len(paste$)
letter$(j)=mid$(paste$,j-cursor)
next j
cursor=cursor+len(paste$)+1
i=i+len(paste$)+1
wait 200
endif
paste=0
if syn=0
cls rgb(100,100,100)
ink rgb(255,255,255),rgb(255,255,255)
box 100,50,700,800
colum=colum+twidth
`gosub checkforwrap
gosub movecursor
if mouseclick()=1 then gosub checkmouse
mousehold=0
if mouseclick()=1
mousehold=1
else
mousehold=0
endif
ink 0,rgb(255,255,255)
for j=0 to i
column=j*twidth
row=column/(screen width()-400)
column=column-row*(screen width()-400)
if row*theight+scroll>-20 and row*theight+scroll<700
ink val(letter2$(j,1)),rgb(255,255,255)
if hilighting(j)=1 then ink val(letter2$(j,1)),rgb(0,0,255)
text column+200,row*theight+150+scroll,letter$(j)
if letter2$(j,0)="1" and asc(letter$(j))>64 or letter2$(j,0)="5" and asc(letter$(j))>64 then paste image asc(letter$(j)),column+200,row*theight+150+scroll-1
if letter2$(j,0)="2" and asc(letter$(j))>64 or letter2$(j,0)="6" and asc(letter$(j))>64 then paste image asc(letter$(j))*4,column+200,row*theight+150+scroll-1
if letter2$(j,0)="3" and asc(letter$(j))>64 or letter2$(j,0)="7" and asc(letter$(j))>64 then paste image asc(letter$(j))*8,column+200,row*theight+150+scroll-1
if letter2$(j,0)="4" and asc(letter$(j))>64 or letter2$(j,0)="5" or letter2$(j,0)="6" or letter2$(j,0)="7" then line column+200,row*theight+150+scroll+theight-2,column+200+twidth,row*theight+150+scroll+theight-2
ink 0,rgb(255,255,255)
endif
next j
ink rgb(200,200,200),rgb(200,200,200)
box 0,0,800,21
menu("FILE",200,0,250,21,1,6,0)
menu("EDIT",250,0,300,21,2,9,0)
menu("FONTS",650,0,800,21,3,21,0)
menu("Special Chars.",0,0,200,21,4,200,1)
button("/\",760,520,800,560,11)
button("\/",760,560,800,600,12)
button("COLOR",600,0,650,21,36)
row2=(cursor*twidth)/(screen width()-400)
paste image 1,(cursor*twidth)-row2*(screen width()-400)+200-(twidth/2),row2*theight+150+scroll,1
fastsync
cls rgb(100,100,100)
syn=1000
endif
if syn>0 then syn=syn-1
loop
checkforwrap:
for j=1 to i/lastchar
if asc(letter$(lastchar*j))>32
for k=lastchar*j to ((lastchar*(j-1)))+1 step -1
if letter$(k)=" " then firstchar=k: goto checknext
next k
goto nowrap
checknext:
for k=i to firstchar step -1
letter$((lastchar*j)-firstchar+(k))=letter$(k)
next k
i=i+(lastchar*j)-firstchar
if cursor=(lastchar*j) or cursor=(lastchar*j)+1 then cursor=cursor+(lastchar*j)-firstchar
for k=firstchar to lastchar*j
letter$(k)=" "
next k
endif
nowrap:
next j
return
movecursor:
if rightkey()=1 and cursor<i then cursor=cursor+1:wait 100
if leftkey()=1 and cursor>0 then cursor=cursor-1:wait 100
return
checkmouse:
if mousey()<100 then goto nomovecursor
if mousehold=0
x=(mousex()-200)/twidth
y=(mousey()-150-scroll)/theight
if mousex()<200 or mousex()>screen width()-200 or mousey()<140 then goto nomovecursor
cursor=y*((screen width()-400)/twidth)+x
oldcursor=cursor
for j=0 to i
hilighting(j)=0
next j
if cursor>i
for j=i to cursor
letter$(j)=" "
next j
i=cursor
endif
endif
if mousehold=1
for j=1 to i
hilighting(j)=0
next j
x=(mousex()-200)/twidth
y=(mousey()-150-scroll)/theight
if mousex()<200 or mousex()>screen width()-200 or mousey()<140 then goto nomovecursor
cursor=y*((screen width()-400)/twidth)+x
if cursor>i
for j=i to cursor
letter$(j)=" "
next j
i=cursor
endif
if cursor<oldcursor
for j=cursor to oldcursor-1
hilighting(j)=1
next j
endif
if cursor>oldcursor
for j=cursor-1 to oldcursor step -1
hilighting(j)=1
next j
endif
endif
cursorchange=abs(cursor-oldcursor)
nomovecursor:
return
function button(caption$,left,top,right,bottom,number)
ink 0,rgb(200,200,200)
if mousex()>left and mousey()>top and mousex()<right and mousey()<bottom then inside=1
if inside=1 then ink 0,rgb(0,0,200)
if number<40 or number>200 then center text left+(right-left)/2,top+(bottom-top)/2-10,caption$
if number>39 and number<200 then center text left+(right-left)/2,top+(bottom-top)/2-10,chr$(val(caption$))
if inside=1 and mouseclick()=1
if number=1 then gosub save
if number=2 then gosub load
if number=3 then end
if number=4 then goto cut
if number=5 then goto coppy
if number=6 then goto paste
if number=7 then gosub bold
if number=8 then gosub Italics
if number=9 then gosub normal
if number=10 then gosub underline
if number=11 then scroll3=1:wait 100
if number=12 then scroll3=-1:wait 100
if number=13 then gosub export
if number=14 then gosub import
if number>14 and number<36
if number>16 and number<25 or number>31 and number<35
fontnumber=number-13
set text font caption$,1
set text size 20
gosub fontfacing
else
fontnumber=number-13
set text font caption$,255
set text size 20
gosub fontfacing
endif
endif
if number=35
fontnumber=number-13
set text font caption$,1
set text size 20
gosub fontfacing
endif
if number=36 then gosub collor
if number=37 then gosub upper
if number=38 then gosub lower
if number=39 then gosub definition
if number>39 and number<200
keypress$=chr$(val(caption$))
goto write
endif
endif
ink 0,rgb(255,255,255)
endfunction
function menu(caption$,left,top,right,bottom,number,numofbuttons,scroll)
ink 0,rgb(200,200,200)
if mousex()>left and mousey()>top and mousex()<right and mousey()<bottom and mouseclick()=1 then dropdown=number
if dropdown=number then ink 0,rgb(0,0,200)
center text left+(right-left)/2,top+(bottom-top)/2-10,caption$
ink 0,rgb(255,255,255)
if dropdown=number
if number=1 then restore m1
if number=2 then restore m2
if number=3 then restore m3
if number=4 then restore m4
if scroll=1
if downkey()=1 then menuscroll=menuscroll+1
if upkey()=1 then menuscroll=menuscroll-1
for k=1 to menuscroll
read a$
read b
next k
endif
for i=1 to numofbuttons
read a$
read b
button(a$,left,bottom*i,right,bottom*(i+1),b)
next i
if (numofbuttons+1)*bottom <mousey() or mousey()<top or mousex()>right or mousex()<left then dropdown=0
endif
back:
endfunction
Bold:
if oldcursor>cursor then c1=cursor:c2=oldcursor
if oldcursor<cursor then c2=cursor:c1=oldcursor
for j=c1 to c2-1
if letter2$(j,0)="2" then letter2$(j,0)="3"
if letter2$(j,0)="3" then goto nextbold
if letter2$(j,0)="4" then letter2$(j,0)="5"
if letter2$(j,0)="5" then goto nextbold
if letter2$(j,0)="6" then letter2$(j,0)="7"
if letter2$(j,0)="7" then goto nextbold
letter2$(j,0)="1"
nextbold:
next j
return
Italics:
if oldcursor>cursor then c1=cursor:c2=oldcursor
if oldcursor<cursor then c2=cursor:c1=oldcursor
for j=c1 to c2-1
if letter2$(j,0)="1" then letter2$(j,0)="3"
if letter2$(j,0)="3" then goto nextitalics
if letter2$(j,0)="4" then letter2$(j,0)="6"
if letter2$(j,0)="6" then goto nextitalics
if letter2$(j,0)="5" then letter2$(j,0)="7"
if letter2$(j,0)="7" then goto nextitalics
letter2$(j,0)="2"
nextitalics:
next j
return
Underline:
if oldcursor>cursor then c1=cursor:c2=oldcursor
if oldcursor<cursor then c2=cursor:c1=oldcursor
for j=c1 to c2-1
if letter2$(j,0)="1" then letter2$(j,0)="5"
if letter2$(j,0)="5" then goto nextunderline
if letter2$(j,0)="2" then letter2$(j,0)="6"
if letter2$(j,0)="6" then goto nextunderline
if letter2$(j,0)="3" then letter2$(j,0)="7"
if letter2$(j,0)="7" then goto nextunderline
letter2$(j,0)="4"
nextunderline:
next j
return
Normal:
if oldcursor>cursor then c1=cursor:c2=oldcursor
if oldcursor<cursor then c2=cursor:c1=oldcursor
for j=c1 to c2-1
letter2$(j,0)="0"
next j
return
save:
ink 0,rgb(255,255,255)
cls
sync
text 0,0,"Save as: "
input "Save as: ",save$
save array save$+".spopovichtext",letter$(100000)
letter2$(100000,1)=str$(i)
letter2$(100000,0)=str$(cursor)
save array save$+".spopovichformating",letter2$(100000,1)
return
load:
ink 0,rgb(255,255,255)
cls
text 0,0,"Load: "
sync
input "Load: ",save$
load array save$+".spopovichtext",letter$(100000)
load array save$+".spopovichformating",letter2$(100000,1)
i=val(letter2$(100000,1))
cursor=val(letter2$(100000,0))
return
export:
ink 0,rgb(255,255,255)
cls
sync
text 0,0,"Export as: "
input "Export as: ",save$
open to write 1,save$+".txt"
for j=0 to i
line$=line$+letter$(j)
lin=lin+1
if lin=40
write string 1,line$
line$=""
lin=0
endif
next j
write string 1,line$
close file 1
return
Import:
ink 0,rgb(255,255,255)
cls
sync
text 0,0,"Import: "
input "Import: ",save$
open to read 1,save$+".txt"
i=0
cursor=0
repeat
read string 1,line$
for k=0 to len(line$)
add$=mid$(line$,k+1)
letter$(lin*40+k)=add$
if add$="" or add$=" " or asc(add$)=0 then stop=stop+1
i=i+1
cursor=cursor+1
print asc(add$)
next k
lin=lin+1
until stop=10
i=2000
cursor=2000
close file 1
sync
suspend for key
return
upper:
if oldcursor>cursor then c1=cursor:c2=oldcursor
if oldcursor<cursor then c2=cursor:c1=oldcursor
for j=c1 to c2-1
letter$(j)=upper$(letter$(j))
next j
return
lower:
if oldcursor>cursor then c1=cursor:c2=oldcursor
if oldcursor<cursor then c2=cursor:c1=oldcursor
for j=c1 to c2-1
letter$(j)=lower$(letter$(j))
next j
return
collor:
ink 0,rgb(255,255,255)
sync
repeat
r$=r$+(inkey$())
if keystate(14)=1 then r$=left$(r$,len(r$)-2)
cls
text 0,20,r$
text 0,0,"red ammount"
sync
wait 100
until returnkey()=1
r=val(r$)
sync
sync
repeat
g$=g$+(inkey$())
if keystate(14)=1 then g$=left$(g$,len(g$)-2)
text 0,60,g$
text 0,40,"green ammount"
sync
wait 100
until returnkey()=1
g=val(g$)
sync
repeat
b$=b$+(inkey$())
if keystate(14)=1 then b$=left$(b$,len(b$)-2)
text 0,100,b$
text 0,80,"blue ammount"
sync
wait 100
until returnkey()=1
b=val(b$)
sync
if oldcursor>cursor then c1=cursor:c2=oldcursor
if oldcursor<cursor then c2=cursor:c1=oldcursor
color=(rgb(r,g,b))
color$=str$(color)
color$=right$(color$,len(color$)-1)
for j=c1 to c2-1
letter2$(j,1)=color$
next j
return
prin:
cls rgb(255,255,255)
SET WINDOW SIZE 800, 700
sync
ink 0,rgb(255,255,255)
for j=0 to i
column=j*twidth
row=column/(screen width()-400)
column=column-row*(screen width()-400)
ink val(letter2$(j,1)),rgb(255,255,255)
if hilighting(j)=1 then ink val(letter2$(j,1)),rgb(0,0,255)
text column+200,row*theight,letter$(j)
if letter2$(j,0)="1" and asc(letter$(j))>64 or letter2$(j,0)="5" and asc(letter$(j))>64 then paste image asc(letter$(j)),column+200,row*theight-1
if letter2$(j,0)="2" and asc(letter$(j))>64 or letter2$(j,0)="6" and asc(letter$(j))>64 then paste image asc(letter$(j))*4,column+200,row*theight-1
if letter2$(j,0)="3" and asc(letter$(j))>64 or letter2$(j,0)="7" and asc(letter$(j))>64 then paste image asc(letter$(j))*8,column+200,row*theight-1
if letter2$(j,0)="4" and asc(letter$(j))>64 or letter2$(j,0)="5" or letter2$(j,0)="6" or letter2$(j,0)="7" then line column+200,row*theight+theight-2,column+200+twidth,row*theight+theight-2
ink 0,rgb(255,255,255)
next j
sync
suspend for key
get image 6,200,0,600,600
save image "print6.jpg",6
SET WINDOW SIZE 800, 600
return
definition:
word$=""
if oldcursor>cursor then c1=cursor:c2=oldcursor
if oldcursor<cursor then c2=cursor:c1=oldcursor
for j=c1 to c2-1
word$=word$+letter$(j)
next j
execute file "C:\Program Files\Internet Explorer\iexplore.exe","http://dictionary.reference.com/search?q="+word$,""
return
fontfacing:
add=3
cls
ink 0,rgb(255,255,255)
cls rgb(255,255,255)
sync
set text to bold
width=text width("a")
height=text height("A")
for j=65 to 90
text 0,fontnumber*20,"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
sync
get image j,(j-65)*width,fontnumber*20,(j-64)*width,fontnumber*20+20
next j
cls rgb(255,255,255)
sync
cls rgb(255,255,255)
text 0,fontnumber*20,"abcdefghijklmnopqrstuvwxyz"
sync
for j=97 to 122
get image j,(j-97)*width,fontnumber*20,(j-96)*width,fontnumber*20+20
next j
ink 0,rgb(255,255,255)
set text to italic
ink 0,rgb(255,255,255)
cls rgb(255,255,255)
sync
width=text width("a")
text 0,fontnumber*20,"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
sync
for j=65 to 90
get image j*4,(j-65)*width+width/2-2,fontnumber*20,(j-64)*width+width/2-2,fontnumber*20+20
next j
cls rgb(255,255,255)
text 0,fontnumber*20,"abcdefghijklmnopqrstuvwxyz"
sync
for j=97 to 122
get image j*4,(j-97)*width+width/2-2,fontnumber*20,(j-96)*width+width/2-2,fontnumber*20+20
next j
ink 0,rgb(255,255,255)
box 0,0,10,20
set text to bolditalic
ink 0,rgb(255,255,255)
cls rgb(255,255,255)
sync
width=text width("a")
text 0,fontnumber*20,"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
sync
for j=65 to 90
get image j*8,(j-65)*width+width/2-2,fontnumber*20,(j-64)*width+width/2-2,fontnumber*20+20
next j
cls rgb(255,255,255)
text 0,fontnumber*20,"abcdefghijklmnopqrstuvwxyz"
sync
for j=97 to 122
get image j*8,(j-97)*width+width/2-2,fontnumber*20,(j-96)*width+width/2-2,fontnumber*20+20
next j
ink 0,rgb(255,255,255)
set text to normal
set text opaque
return
m1:
data "Save",1
data "Load",2
data "Definition",39
data "Export",13
data "Import",14
data "Exit",3
return
m2:
data "Cut",4
data "Coppy",5
data "Paste",6
data "Bold",7
data "Italics",8
data "Normal",9
data "Undeline",10
data "Uppercase",37
data "Lowercase",38
return
m3:
data "Lucida Console",15
data "Impact",16
data "AvantGarde Bk BT",17
data "Swiss911 XCm BT",18
data "WP BoxDrawing",19
data "Cuckoo",20
data "Tristan",21
data "Aurora Cn BT",22
data "Informal011 BT",23
data "Unicorn",24
data "MS Mincho",25
data "MS Gothic",26
data "GulimChe",27
data "DotumChe",28
data "BatangChe",29
data "Gungsuh",30
data "GungsuhChe",31
data "SimSun",32
data "NSimSun",33
data "MingLiU",34
data "Fixedsys",35
m4:
data "123",163
data "124",162
data "125",161
data "126",160
data "127",159
data "128",158
data "129",157
data "130",156
data "131",130
data "132",131
data "133",132
data "134",133
data "135",134
data "136",135
data "137",136
data "138",137
data "139",138
data "140",139
data "141",140
data "142",141
data "143",142
data "144",143
data "145",144
data "146",145
data "147",146
data "148",147
data "149",148
data "150",149
data "151",150
data "152",151
data "153",152
data "154",153
data "159",154
data "160",155
data "161",104
data "162",105
data "163",106
data "164",107
data "165",108
data "171",109
data "172",110
data "173",111
data "174",112
data "175",113
data "176",114
data "177",115
data "178",116
data "179",117
data "180",118
data "181",119
data "182",120
data "183",121
data "184",122
data "185",123
data "186",124
data "187",125
data "188",126
data "189",127
data "190",128
data "191",129
data "192",40
data "193",41
data "194",42
data "195",43
data "196",44
data "197",45
data "198",46
data "199",47
data "200",48
data "201",49
data "202",50
data "203",51
data "204",52
data "205",53
data "206",54
data "207",55
data "208",56
data "209",57
data "210",58
data "211",59
data "212",60
data "213",61
data "214",62
data "215",63
data "216",64
data "217",65
data "218",66
data "219",67
data "220",68
data "221",69
data "222",70
data "223",71
data "224",72
data "225",73
data "226",74
data "227",75
data "228",76
data "229",77
data "230",78
data "231",79
data "232",80
data "233",81
data "234",82
data "235",83
data "236",84
data "237",85
data "238",86
data "239",87
data "240",88
data "241",89
data "242",90
data "243",91
data "244",92
data "245",93
data "246",94
data "247",95
data "248",96
data "249",97
data "250",98
data "251",99
data "242",100
data "243",101
data "254",102
data "255",103
Do not ask what the forums can do ask what you can do for the forums.