PT_ wrote:
Code:
23int(A/6-1)+B/4+2->theta
//Could be
23int(A/6)+B/4-21->theta
Code:
B/4-21+23int(A/6->theta
23int(A/6-1)+B/4+2->theta
//Could be
23int(A/6)+B/4-21->theta
B/4-21+23int(A/6->theta
DelVar XDelVar RDelVar SClrDraw
0->Xmin:1->DeltaX
0->Ymin:1->DeltaY
AxesOff
DispGraph
Text(0,1,"12345678901
Text(0,69,"99/99
Line(89,55,89,62
Line(67,55,67,62
Horizontal 55
DelVar B8->A
" ->Str7
Repeat S and K=22
Repeat Ans
Line(B,61-A,B,57-A
getKey->K
Line(B,61-A,B,57-A,0
End
If Ans=21 or Ans=31:Then
If Ans=21:Then
DelVar Rnot(S->S
If S:Then
Text(0,91,"2
Else
Text(0,91,"
End:End
If Ans=31:Then
If not(R:3->R
DelVar SR-1->R
If R:Then
Text(0,91,"A
If R<2
Text(0,91,"a
Else
Text(0,91,"
End:End:End
If R=2:"ABC DEFGHIJKLMNOPQRSTUVWXYZtheta' :?
If R=1:"abc defghijklMnopqrstuvWxyztheta' :?
If S:" |E{}[e] [ ] [i]
If not(R) and not(S:"= ^ ,()/ 789plotdot 456-\>123+ 0.~
If K>=41 and K<=104:Then
If " "!=sub(Ans,K-20-5int(.1K),1) or (K=102 and R
Then
sub(Ans,K-20-5int(.1K),1->Str8
If B>89 and A<54:DelVar BA+6->A
Text(A,B+1,"
Text(A,B+1,Str8
If R=1 and inString("WM",Str8
Then
Line(B+1,61-A,B+3,61-A,0
Pt-Off(B+2,60-A
sub("wm",inString("WM",Str8),1->Str8
End
23round(A/6-1,0)+B/4+2->theta
If Ans=length(Str7
Then
Str7+Str8->Str7
Else
sub(Str7,1,theta)+Str8
If theta+1<length(Str7
Ans+sub(Str7,theta+2,length(Str7)-theta-1
Ans->Str7
End
B+4->B
End:End
If S and sum(K={24,26
Then
If A>8 and K=24 and not(B:Then
92->B:A-6->A:End
If B=92 and A<54 and K=26
DelVar BA+6->A
If (length(Str7)>23round(A/6-1,0)+B/4+2 and K=26) or (K=24 and (B and A=8) or (B!=92 and A=50) or A>8 and A<54:Then
Line(B,62-A,B,57-A,MK=624
For(F,B,B+3(K-25),K-25
For(G,A,A+5
Pxl-Change(G,F
End:End
If not(X:Then
K->M
23round(A/6-1,0)+B/4+2->X
End
B+4(K-25->B
23round(A/6-1,0)+Ans/4+2->V
If V=X
DelVar XDelVar M
End:End
If not(S) and sum(K={24,25,26,34
Then
If not(B) and A>8 and K=24
Then
A-6->A:92->B
End
B+4((K=26)(B<92)(length(Str7)>23round((A-6)/6,0)+B/4+2)-(K=24)(B>0->B
A+6((K=34)(A<54)(length(Str7)>23round(A/6,0)+B/4+1)-(K=25)(A>8->A
If B=92 and A<54 and K=26:DelVar BA+6->A
End
If K=14 and X!=V:Then
If X>V
V+.01X
If V>X
X+.01V
sub(Str9,1,1)+sub(Str7,iPart(Ans)+1,100fPart(Ans)-iPart(Ans))+sub(Str9,2,length(Str9)-1->Str9
End
If sum(K={15,23:Then
If K=23:Then
23int(A/6)+B/4-21->theta
If not(X) and Ans!=length(Str7) or (X:Then
If not(X:Then
If Ans+1<length(Str7
sub(Str7,1,Ans)+sub(Str7,Ans+2,length(Str7)-Ans-1
If theta+1=length(Str7
sub(Str7,1,theta
End
If X:Then
If X>V
V+.01X->theta
If V>X
X+.01V->theta
If 100fPart(Ans)<length(Str7
sub(Str7,1,iPart(Ans))+sub(Str7,100fPart(Ans)+1,length(Str7)-100fPart(Ans
If 100fPart(theta)=length(Str7
sub(Str7,1,iPart(theta
DelVar XDelVar M
End:Ans->Str7
End:End
If K=15 and "[xhat]T"!=sub(Str9,2,2:Then
sub(Str7,1,23int(A/6)+B/4-21)+sub(Str9,2,inString(Str9,"[xhat]T")-2
If 23int(A/6)+B/4-21<length(Str7
Ans+sub(Str7,23int(A/6)+B/4-20,abs(23int(A/6)+B/4-21-length(Str7
Ans->Str7
End
For(G,int(A/6),1+int((length(Str7)-1)/23
Text(6G+2,(B+1)(G=int(A/6))+(G>int(A/6)),"
If length(Str7)>2:Then
23->theta
If length(Str7)<23G:length(Str7)-23(G-1->theta
For(F,(B+1)(G=int(A/6))+(G>int(A/6)),8+int(3.87Ans),4
If theta=23 or 23(G-1)+(F-1)/4<length(Str7
sub(Str7,23G-20-2(F>5)+int(F/4)(23G-20-2(F>5)+int(F/4)<=length(Str7)),1
If Ans="
"
If F>5 and not(inString("wm",Ans)) and (theta=23 or 23(G-1)+(F-1)/4<length(Str7
Text(6G+2,F-8,Ans
If inString("wm",Ans:Then
Text(6G+2,F-8,sub("WM",inString("wm",Ans),1
Line(F,61-(6G+2),F+2,61-(6G+2),0
Pt-Off(F+1,60-(6G+2
End:End:End:End
If 23int(A/6)+B/4-21>length(Str7:Then
2+6(1+int((length(Str7)-1)/23->A
4((length(Str7)-2)-23int(length(Str7)/23->B
End:End:End
ClrHome
If K=15:Then
If "[xhat]T"!=sub(Str9,2,2:Then //would this be better/faster than combining it with the previous line?
sub(Str7,1,23int(A/6)+B/4-21)+sub(Str9,2,inString(Str9,"[xhat]T")-2
If 23int(A/6)+B/4-21<length(Str7
Ans+sub(Str7,23int(A/6)+B/4-20,abs(23int(A/6)+B/4-21-length(Str7
Ans->Str7
End:End
// -----------------------------------------------------------------------------------------
// -------------------- CSENote ---------------------------------------------------------
// -----------------------------------------------------------------------------------------
// Variables:
// A - Index of left "+", selected note
// B - Index of right "+", selected mode
// F - Mode of selecting text
// G - [2nd] = On/Off
// H - Mode of [ALPHA]
// L - Left x-value of selected text
// M - right x-value of selected text
// N - y-value of selected text
// Str7 - Copied text
// Str9 - Content of note
// Keys:
// [TRACE] to select
// [ZOOM] to copy (if something is selected)
// [WINDOW] to paste (if something is selected)
// [2nd] to activate the 2nd-mode
// Arrows to move
// [ALPHA] to add a letter, of character
// [DEL] to delete a letter, or the selected stuff.
// [MODE] to go back to the homescreen of my program
// When at my homescreen:
// [Y=], [WINDOW] to select a note
// [TRACE], [GRAPH] to select a mode
// I hope this is all, goodluck :)
:DCS
"2222222222222222BBBBBBBBBBBBBBBBBBBBBBB333B333BBBBBBBBB3B3BB3BBBB6BBB6B3B3BB3BBBB6BBB6B3B3BB3BBBB66BB6B333BB3BBBB666B6BBBBBBBBBBB6B666BBBBBBBBBBB6BB66B333BB33BBB6BBB6B3BBB3BBBBB6BBB6B33BBB3BBBBBBBBBB3BBBBB3BBBBBBBBB333B33BBBBBBBBBBBBBBBBBBB2222222222222222"
ClrHome
If 80>det([[20
Then
Disp "Get DoorsCSE to run this","http://dcs.cemetech.net"
Return
End
StoreGDB 1
"rowSwap(NOTES2"->Str0
1->A
1->B
det(0
~1->L
~1->M
~1->N
If Str9="..P:NT:FN"
Then
det(4
"NEW POST"->Str9
1:det(2
"CONTENT"->Str9
2:det(1
End
0->Xmin
264->Xmax
0->Ymin
det(0
164->Ymax
FnOff
AxesOff
BackgroundOff
Lbl 0
ClrDraw
TextColor(Black
Text(~1,0,0,"NOTES"
Line(0,147,264,147,Black
Line(195,164,195,0,Black
Lbl 1
real(8,1,0
real(7,9,32,33,240,70,255,1
real(8,1,1
real(7,9,0,33,50,70,255,1
For(Z,1,min(20,theta),2
Z:det(0
Text(13+7Z,15,Str9
End
Text(20,210,"Add"
Text(34,210,"Edit"
Text(48,210,"Delete"
Text(62,210,"Rename"
DelVar KTextColor(Orange
Repeat max(K={45,105
Text(6+14B,200,"+"
Text(6+14A,5,"+"
Repeat Ans
getKey
End
Ans->K
If max(K={11,12
Text(6+14A,5," "
If max(K={14,15
Text(6+14B,200," "
min(10,min(theta/2,max(1,A+sum(DeltaList(K={11,12->A
min(4,max(1,B+sum(DeltaList(K={14,15->B
End
TextColor(BLACK
// Exit
If K=45
Then
RecallGDB 1
ClrHome
Return
End
If K=105
Then
// Change title
If B=4
Then
Input "ENTER THE TITLE:",Str9
2A-1:det(1
End
// Delete note
If B=3 and theta!=2
Then
2A-1:det(7
det(7
A-(A>1->A
End
// Add note
If B=1
Then
"NEW POST"->Str9
theta+1:det(2
"CONTENT"->Str9
theta+2:det(2
End
// Edit note
If B=2
Then
" "->Str7
DelVar FDelVar GDelVar SDelVar T2->H
ClrDraw
2A-1:det(0
Text(~1,0,0,Str9
2A:det(0
length(Str9->P
Line(0,147,264,147,Black
For(Z,0,int(P/29
For(D,1,min(29,P-29Z
Text(20+14Z,9D-7,sub(Str9,29Z+D,1
End
End
Repeat K=22
getKey->K
max(0,min(int(P/29),T+sum(DeltaList(K={25,34->T
max(0,min(29,min(P-29T,S+sum(DeltaList(K={24,26->S
// Paste selected stuff
If K=12 and Str7!=" "
Then
" "
If 29T+S
Ans+sub(Str9,1,29T+S
Ans+Str7
If P-29T-S
Ans+sub(Str9,29T+S+1,P-29T-S
sub(Ans,2,length(Ans)-1->Str9
length(Ans->P
End
// Copy selected stuff
If K=13 and ~1!=L
sub(Str9,1+L,M-L->Str7
// Some code to change modes
If K=14:not(F->F
If K=21:not(G->G
If G
Then
If K=24:0->S
If K=25:0->T
If K=26:min(29,P-29T->S
If K=34
Then
int(P/29->T
min(S,P-29T->S
End
End
If K=31:H+1-3(H=2->H
Line(9S,143-14T,9S,130-14T,RED
If K
Then
Text(0,186,sub(" [\\T]",10F+1,3+7not(F
Text(0,205,sub(" [2nd]",17G+1,5+12not(G
Text(0,240,sub("[\\A][a] ",3H+1,3+7(H=2
End
// Delete character/selected stuff
If K=23
Then
DelVar Q" "
If T+S and ~1=L
Ans+sub(Str9,1,29T+S
If 0<L
Ans+sub(Str9,1,L+29N
If 29T+S+1<P and ~1=L
Ans+sub(Str9,29T+S+2,P-29T-S-1
If ~1!=L and P-29N-M
Ans+sub(Str9,29N+M+1,P-29N-M-2
sub(Ans,2,length(Ans)-1->Str9
length(Ans->P
If ~1!=L
L->S
End
// Add character
If K>34 and ~1=L
Then
1->Q
" "
If T+S
Ans+sub(Str9,1,29T+S
Ans+sub("ABC DEFGHIJKLMNOPQRSTUVWXYZtheta\' .? abc defghijklmnopqrstuvwxyztheta\'* .? ^^^2,()/ 789* 456- 123+ 0.~ ",K-5int(.1K+4)+35H,1
If 29T+S<P
Ans+sub(Str9,29T+S+1,P-29T-S
sub(Ans,2,length(Ans)-1->Str9
length(Ans->P
End
// Select character
If F and max(K={24,26
Then
If ~1=N
T->N
If K=24 and S>~1 and T=N
Then
If S+1=L or ~1=L:S->L
If S+1=M:S->M
If ~1=M:S+1->M
End
If K=26 and S<30 and T=N
Then
If S-1=L:S->L
If S-1=M or ~1=M:S->M
If ~1=L:S-1->L
End
// Display highlighted stuff
If T=N
Then
For(Z,max(1,L),min({M+1,29,P-29N
If Z=1+L
Asm(prgmCHANGE
sub(Str9,29N+Z,1
If inString(" .,:",Ans
Ans+" "
If Z>L and Z<=M
Ans+" "
Text(20+14N,9Z-7,Ans
If Z=M
Asm(prgmCHANGE
End
End
If not(M-L
Then
~1->L
~1->M
~1->N
End
End
Line(9S,143-14T,9S,130-14T,20-8(S>L and S<=M and T=N
// Update screen
If ~1=L and (K=23 or K>34) or (K=12 and Str7!=" ") or (K=23 and ~1!=L
Then
For(Z,T(~1=L)+N(L!=~1),int(P/29
real(8,1,0
real(7,9,27,33+7Z,210,8,255,0
real(8,1,1
real(7,9,0,33+7Z,130,8,255,0
For(D,1,min(29,P-29Z
Text(20+14Z,9D-7,sub(Str9,29Z+D,1
End
End
real(8,1,0
real(7,9,27,40+7int(P/29),210,7,255,1
real(8,1,1
real(7,9,0,40+7int(P/29),130,7,255,1
S+Q(S<29)-not(Q)(S and S=not(P-29T->S
T+Q(S=29)-not(Q)(T and not(P-29T->T
If Q and S=29
0->S
~1->L
~1->M
~1->N
2A:det(1
End
End
Goto 0
End
End
DispGraph
Goto 1
If sum(K={15,23:Then
If K=23:Then
23int(A/6)+B/4-21->theta
If not(X) and Ans!=length(Str7) or (X:Then
If not(X:Then
If Ans+1<length(Str7
sub(Str7,1,Ans)+sub(Str7,Ans+2,length(Str7)-Ans-1
If theta+1=length(Str7
sub(Str7,1,theta
End
If X:Then
If X>V
V+.01X->theta
If V>X
X+.01V->theta
If 100fPart(Ans)<length(Str7
sub(Str7,1,iPart(Ans))+sub(Str7,100fPart(Ans)+1,length(Str7)-100fPart(Ans
If 100fPart(theta)=length(Str7
sub(Str7,1,iPart(theta
DelVar XDelVar M
End:Ans->Str7
End:End
If K=15 and "[xhat]T"!=sub(Str9,2,2:Then
sub(Str7,1,23int(A/6)+B/4-21)+sub(Str9,2,inString(Str9,"[xhat]T")-2
If 23int(A/6)+B/4-21<length(Str7
Ans+sub(Str7,23int(A/6)+B/4-20,abs(23int(A/6)+B/4-21-length(Str7
Ans->Str7
End
For(G,int(A/6),1+int((length(Str7)-1)/23
Text(6G+2,(B+1)(G=int(A/6))+(G>int(A/6))," " //94 spaces
If length(Str7)>2:Then
23->theta
If length(Str7)<23G:length(Str7)-23(G-1->theta
For(F,(B+1)(G=int(A/6))+(G>int(A/6)),8+int(3.87Ans),4
If theta=23 or 23(G-1)+(F-1)/4<length(Str7
sub(Str7,23G-20-2(F>5)+int(F/4)(23G-20-2(F>5)+int(F/4)<=length(Str7)),1
If Ans=" " // 1space
" " //4 spaces
If F>5 and not(inString("wm",Ans)) and (theta=23 or 23(G-1)+(F-1)/4<length(Str7
Text(6G+2,F-8,Ans
If inString("wm",Ans:Then
Text(6G+2,F-8,sub("WM",inString("wm",Ans),1
Line(F,61-(6G+2),F+2,61-(6G+2),0
Pt-Off(F+1,60-(6G+2
End:End:End:End
If 23int(A/6)+B/4-21>length(Str7:Then
2+6(1+int((length(Str7)-1)/23->A
4((length(Str7)-2)-23int(length(Str7)/23->B
End:End:End
23G > 20+length(Str7)
Lets length(Str)=47, then G would maximal being 3
23*3 = 69
69 > 20+47 ....... while 46<length(Str7) (also true)
23(G-1)+(F-1)/4<length(Str7// True
sub(Str7,49+something,1
If not(S) and sum(K={24,25,26,34
Then
If not(B) and A>8 and K=24
Then
A-6->A:92->B
End
B+4((K=26)(B<92)(length(Str7)>23round((A-6)/6,0)+B/4+2)-(K=24)(B>0->B
A+6((K=34)(A<54)(length(Str7)>23round(A/6,0)+B/4+1)-(K=25)(A>8->A
If B=92 and A<54 and K=26:DelVar BA+6->A
//here is the important part:
If K=34 and 23int(A/6)+B/4+2>length(Str7:Then //if down pressed and cursor would be past length(str7) when it moves to next line
2+6(1+int((length(Str7)-1)/23->A //convert length(str7) to y value for cursor
4((length(Str7)-2)-23int(length(Str7)/23->B //convert length(str7) to x value for cursor
End:End
if k=34 and 35>37:Then
//code
end
A+6((K=34)(A<54)(length(Str7)>23round(A/6,0)+B/4+1)-(K=25)(A>8->A
A+6(1*1*1)-0*1=A+6
If K=34 and 23int(A/6)+B/4+2>length(Str7:Then
If TRUE and 23*2+10+2>37 which is false
If K=34 and 23int((A-1)/6)+B/4+2>length(Str7:Then
23int(A/6-1)+B/4+2>length(Str7
A+6((K=34)(A<54)(length(Str7)>23round(A/6,0)+B/4+1)-(K=25)(A>8->A
A+6((K=34)(A<54)(int(A/6)<=int((length(Str7)-1)/23))-(K=25)(A>8->A
A+6(1*1*(1<=0)-(K=25)(A>8->A
A+6(1*1*(1<=1)-(K=25)(A>8->A
min(B,4length(Str7)+92-92int(A/6->B
min(B,4length(Str7)-92int(A/6-1->B
min(B,4length(Str7)-92int(A/6-1
min(B,4*35-92*int(2.33333-1
min(B,140-92*1
min(B,48
If not(S) and sum(K={24,25,26,34
Then
If not(B) and A>8 and K=24
Then
A-6->A:92->B
End
B+4((K=26)(B<92)(length(Str7)>23round((A-6)/6,0)+B/4+2)-(K=24)(B>0->B
A+6((K=34)(A<54)(int(A/6)<=int((length(Str7)-1)/23))-(K=25)(A>8->A
If B=92 and A<54 and K=26:DelVar BA+6->A
min(B,4length(Str7)-92int(A/6-1->B
End
If not(S) and sum(K={24,25,26,34:Then
If not(B) and A>8 and K=24:Then
A-6->A:92->B:End
B+4((K=26)(B<92)(length(Str7)>23int(A/6-1)+B/4+2)-(K=24)(B>0->B
A+6((K=34)(A<54)(length(Str7)>=23int(A/6)+1)-(K=25)(A>8->A //a+6 now only relies on if any text is on next line
If B=92 and A<54 and K=26:DelVar BA+6->A
If K=34 and A<54 and 23int(A/6-(length(Str7)>23int(A/6-1)+B/4+1))+B/4+2>length(Str7 //changed this as well obviously
4((length(Str7)-2)-23int(length(Str7)/23->B //update x value of cursor
End
If B=92 and A<54 and K=26:DelVar BA+6->A
If K=34 and A<54 and 23int(A/6-(length(Str7)>23int(A/6-1)+B/4+1))+B/4+2>length(Str7 //changed this as well obviously
4((length(Str7)-2)-23int(length(Str7)/23->B
If B=92 and K=26:DelVar BA+6->A
23int(A/6
If K=34 and Ans-23(length(Str7)>Ans+B/4-22)+B/4+2>length(Str7 //changed this as well obviously
4length(Str7)-8-92int(length(Str7)/23->B
Advertisement