Hi, I'm working on a clipboard program, unlike the normal copy and paste, this can store up to 20 pieces of data, but you still cant save it coz I only started today and i havent had the time to do that, but tell me what you think anyway.
` -- Clipboard --
`-------------------
`by Alastair Zotos
`This is a program that is made for storing
`text, just like copying and pasting, but...
`unfortunatelly with copying and pasting you
`can only copy one thing, however with this
`you can store up to 20 pieces of data, and
`saves them as a ".clp" file. (in the future)
`
`P.S. Doesn't save anything yet, but I'm
`working on it....
`-------------------------------------------
title$ = "Clipboard V1.0"
`-------------------------------------------
`setup
sync on
sync rate 0
set display mode 1024,768,16
set window on
maximize window
set window title title$
cls rgb(225,225,225)
`arrays
dim dat$(20)
`variables
sz#=1024
op#=0
sz2#=768
op2#=0
dataent=1
`main loop
sync
`---------------
do
`create buttons [ button("text","font",x,y,width,height) ]
if button("Write","comic sans ms",77.5,50.0,47.5,15.0)>0 then buttonpressed=1
if button("Close","comic sans ms",182.5,50.0,47.5,15.0)>0 then buttonpressed=2
if button("Open Clipboard","comic sans ms",130.0,85.0,100.0,15.0)>0 then buttonpressed=3
if button("Close Clipboard","comic sans ms",130.0,120.0,100.0,15.0)>0 then buttonpressed=4
`page size
if buttonpressed=3
inc op#,7.0
dec sz#,op#
endif
if buttonpressed=4
inc op#,7.0
inc sz#,op#
endif
if sz#<700 then sz#=700 : op#=0
if sz#>1024 then sz#=1024 : op#=0
ink rgb(200,200,200),rgb(225,225,225)
line sz#-3,0,sz#-3,768
line sz#-2,0,sz#-2,768
line sz#+1,0,sz#+1,768
line sz#+2,0,sz#+2,768
line sz#+2,60,1024,60
line sz#+2,61,1024,61
line sz#+2,63,1024,64
line sz#+2,64,1024,65
ink rgb(128,128,128),rgb(225,225,225)
line sz#,0,sz#,768
line sz#-1,0,sz#-1,768
line sz#+2,62,1024,62
line sz#+2,63,1024,63
ink rgb(255,255,255),rgb(225,225,225)
`write to database
if buttonpressed=1
inc op2#,7.0
dec sz2#,op2#
endif
if buttonpressed=2
inc op2#,7.0
inc sz2#,op2#
endif
if sz2#>768 then sz2#=768 : op2#=0
if sz2#<500 then sz2#=500 : op2#=0
ink rgb(200,200,200),rgb(225,225,225)
line 0,sz2#-2,sz#,sz2#-2
line 0,sz2#-1,sz#,sz2#-1
line 0,sz2#+2,sz#,sz2#+2
line 0,sz2#+3,sz#,sz2#+3
ink rgb(128,128,128),rgb(225,225,225)
line 0,sz2#,sz#,sz2#
line 0,sz2#+1,sz#,sz2#+1
ink rgb(255,255,255),rgb(225,225,225)
ink rgb(50,50,50),rgb(225,225,225)
line 30,sz2#+30,sz#-30,sz2#+30
line 30,sz2#+60,sz#-30,sz2#+60
line 30,sz2#+30,30,sz2#+60
line sz#-30,sz2#+30,sz#-30,sz2#+60
if mousex()>30 and mousex()<sz#-30
if mousey()>sz2#+30 and mousey()<sz2#+60
if mouseclick()=1
flash=1
endif
endif
endif
if mousex()<30 and mousex()>sz#-30
if mousey()<sz2#+30 and mousey()>sz2#+60
if mouseclick()=1
flash=0
endif
endif
endif
if flash=1
if flash$="" then flash$="|" else flash$=""
else
flash$=""
endif
if flash=1
new$=entry$()
for n=1 to len(new$)
if asc(mid$(new$,n))=8
dat$(dataent)=left$(dat$(dataent),len(line$)-1)
else
dat$(dataent)=dat$(dataent)+mid$(new$,n)
endif
next n
endif
clear entry buffer
text 40,sz2#+35,"Text to store: "+dat$(dataent)+""+flash$
if flash=1 and returnkey()=1 then dataent=dataent+1 : clear entry buffer
`page text
ink rgb(0,0,0),rgb(225,225,225)
set text size 25
set text font "comic sans ms"
set text to bold
text sz#+30,30,"Clipboard"
if dataent=1 then e1$=">. "
if dataent=2 then e2$=">. "
if dataent=3 then e3$=">. "
if dataent=4 then e4$=">. "
if dataent=5 then e5$=">. "
if dataent=6 then e6$=">. "
if dataent=7 then e7$=">. "
if dataent=8 then e8$=">. "
if dataent=9 then e9$=">. "
if dataent=10 then e10$=">. "
if dataent=11 then e11$=">. "
if dataent=12 then e12$=">. "
if dataent=13 then e13$=">. "
if dataent=14 then e14$=">. "
if dataent=15 then e15$=">. "
if dataent=16 then e16$=">. "
if dataent=17 then e17$=">. "
if dataent=18 then e18$=">. "
if dataent=19 then e19$=">. "
if dataent=20 then e20$=">. "
text sz#+30,70,e1$+""+dat$(1)
text sz#+30,100,e2$+""+dat$(2)
text sz#+30,130,e3$+""+dat$(3)
text sz#+30,160,e4$+""+dat$(4)
text sz#+30,190,e5$+""+dat$(5)
text sz#+30,220,e6$+""+dat$(6)
text sz#+30,250,e7$+""+dat$(7)
text sz#+30,270,e8$+""+dat$(8)
text sz#+30,300,e9$+""+dat$(9)
text sz#+30,330,e10$+""+dat$(10)
text sz#+30,360,e11$+""+dat$(11)
text sz#+30,390,e12$+""+dat$(12)
text sz#+30,420,e13$+""+dat$(13)
text sz#+30,450,e14$+""+dat$(14)
text sz#+30,470,e15$+""+dat$(15)
text sz#+30,500,e16$+""+dat$(16)
text sz#+30,530,e17$+""+dat$(17)
text sz#+30,560,e18$+""+dat$(18)
text sz#+30,590,e19$+""+dat$(19)
text sz#+30,620,e20$+""+dat$(20)
`end loop
sync
cls rgb(225,225,225)
loop
`button function
function button(text$,font$,x#,y#,wi#,he#)
buttonpressed=0
ink rgb(128,128,128),225
box x#-wi#,y#-he#,x#+wi#,y#+he#
ink rgb(200,200,200),225
box (x#-wi#)+2,(y#-he#)+2,(x#+wi#)-2,(y#+he#)-2
ink rgb(0,0,0),225
if mousex()>x#-wi# and mousex()<x#+wi#
if mousey()>y#-he# and mousey()<y#+he#
buttonpressed=1
endif
endif
if buttonpressed=1 then ink rgb(255,255,0),0
set text size 24
set text font font$
set text to bold
center text x#,y#-12,text$
if mouseclick()=0 then buttonpressed=0
`end function
endfunction buttonpressed
EDIT: just changed the code coz last one didnt work well enough, so dont select the code thats on the little bit down there, i couldnt change it
Your signature has been erased by a mod because it's larger than 600x120...