New update coming soon, may need a bit of help with it, but I'll see if I can figure it out first. Multi page notes list now works, but when trying to load up a note that is note #2 or higher, it keeps loading up note #2. strange. I'll figure it out or talk about it in a future post.

The main reason for this post:
i REALLY need a better way to display text after deleting, pasting, or most importantly, actually loading up the note. As I've said before, it currently does it character by character, since not all chars are 3 pixels in width, and my text editor is locked to a grid. I can't display it an entire line at a time, because the TI-OS has perfect kerning. chars like any of these ". ! [space] m w" etc etc need to have a special case be displayed, since they are not 3 pixels in width.

I really would appreciate some ideas here, if anyone can help me out Smile It would speed up my program and make it a lot more user friendly by a BUNCH. Thanks in advance Very Happy
You can now scroll through all your pages of notes, 99 being the page limit, which means 99*6=594 would be your note limit. The problem now is that if you click on any note that is note #2 or higher, it gets stuck at displaying note #2, or giving an error.

Here's the current code for the menu. Program TEXT is the text editor, which I will eventually just put into the same program as the menu. Also, the only relevant parts to my problem I believe should be the "If K=34 and (A=52 and dim(|LTIBN" etc and the "If P or B=87" part, but there may be some other parts that could be relevant due to all the variables changing.

Code:
:DCS6
"000000003FFC20042CC42AA42CA42AA42CA4200427F420042FF420043FFC0000"
CoordOff:GridOff:AxesOff
0->Xmin:1->DeltaX
0->Ymin:1->DeltaY
SetUpEditor TIBN
If not(dim(|LTIBN
Then
" ->Str9
6->dim(|LTIBN
End
UnArchive Str9
33->Z
While Z=33 or (A=12 and B=31 and K!=45
DelVar ZClrDraw
Horizontal 52
Horizontal 51
Text(~1,1,1,"BasicNote
StorePic 1
Text(~1,1,32,"Note
RecallPic 1
DelVar Pic1Line(35,4,35,50
Line(94,4,94,50
Line(0,4,0,50
For(A,51,3,~8
Horizontal A
End
Text(12,2,"NEW NOTE
Text(20,2,"DEL ALL
1->B:Ans->C
For(A,1,6)
If |LTIBN(6(C-1)+A
Then
Text(8A+4,41,sub(Str9,inString(Str9,"[xhat]T",B)+3,inString(Str9,"[xhat]N",B)-(3+inString(Str9,"[xhat]T",B
2+inString(Str9,"[xhat]E",B)->B
End:End
12->A:31->B
Repeat K=45 or Z=33 or (B=87 and |LTIBN(6(C-1)+(A/4-F))) or (A=12 and B=31
0->P
Repeat sum(K={45,105
Text(3,87,C
getKey->K
Text(A,B,"+
If K:Then
Text(A,B,"   
If (K=34 and A=52 and dim(|LTIBN)>6C) or (K=25 and A=12:Then
If K=25 or (K=34 and |LTIBN(1+6C-6(K=25):Then
4(K=34)+60(K=25->A:C+(K=34)-(K=25->C:1->D
For(M,1,6C-6
2+inString(Str9,"[xhat]E",D->D
End
For(M,1,6
Text(8M+4,41,"                                                     
If dim(|LTIBN)>6(C-1)+M:Then
If |LTIBN(6(C-1)+M
Then
Text(8M+4,41,sub(Str9,inString(Str9,"[xhat]T",D)+3,inString(Str9,"[xhat]N",D)-(3+inString(Str9,"[xhat]T",D
2+inString(Str9,"[xhat]E",D)->D
End:End:End:End:End
A+8(K=34)(A<20)(B=31)-8(K=25)(A>12)+8(K=34)(B=87)(A<52)-(A-20)(K=24)(A>12->A
B+56(K=26)(B=31)-56(K=24)(B=87->B
End
round(A/7.5,0->F
Text(A,B,"+
End
If K=105:Then
StorePic 1
If B=31 or (B=87 and |LTIBN(6(C-1)+(A/4-F
Then
If A=20 and B=31:Then
For(I,12,58,8
Text(~1,I,0,"                 
End:End
If B=31:Then
If A=12:Then
1->E
If 1<dim(|LTIBN
Then
DelVar I
Repeat not(|LTIBN(I
I+1->I
If |LTIBN(I
2+inString(Str9,"[xhat]T",E->E
End:End
Str9+"[xhat]T ->Str9
1->I
Repeat not(|LTIBN(I
If |LTIBN(I
I+1->I
End
1->|LTIBN(I
If not(fPart(I/6
dim(|LTIBN)+6->dim(|LTIBN
ClrHome
Repeat Ans and not(inString(Str8,"[xhat]
Input "Title:",Str8
If inString(Str8,"[xhat]
Disp " Err:Invalid:'[xhat]'
12>length(Str8
If not(Ans
Disp "      Err:Length
End
Str9+Str8+"[xhat]N[xhat]E->Str9
1->P
End
If A=20:Then
Text(~1,13,1,"DEL ALL NOTES?
Text(~1,23,13,"CANCEL
Text(~1,33,13,"DELETE
23->Z
Repeat K=105
getKey->K
Text(~1,Z,1,">
If K:Then
Text(~1,Z,1,"
Z+10(K=34)(Z=23)-10(K=25)(Z=33->Z
End:End
If Z=33:Then
" ->Str9
Fill(0,|LTIBN
Text(~1,43,1,"DELETED
rand(30
End
If Z=23:Then
ClrDraw
RecallPic 1
End:End:End
DelVar K
If P or B=87:Then
1->D
If |LTIBN(2:Then
For(E,1,6(C-1)+A/4-F
2+inString(Str9,"[xhat]E",D->D
End:End
ClrDraw
Text(0,1,sub(Str9,inString(Str9,"[xhat]T",D)+2,inString(Str9,"[xhat]N",D)-(2+inString(Str9,"[xhat]T",D
Horizontal 55
prgmTEXT
sub(Str9,1,inString(Str9,"[xhat]N",D)+1)+Str7+sub(Str9,inString(Str9,"[xhat]N",D)+2,length(Str9)-(1+inString(Str9,"[xhat]N",D->Str9
12->A:31->B

End:End:End
End:End
If K!=45:Pause
DelVar Pic1ClrDraw
ClrHome
Output(1,1,"


Here's a test run, with this code:


Also, this will be mainly for my benefit, but I will post it here. These are all the variable usages. Some variables are temporary, meaning they are used in only a section of the code, and can be overwritten.
Menu

Code:
|LTIBN - holds whether a note exists or not. the dim() of it is pretty close to how many notes there are, but is a multiple of 6.
Str9 - Main note string, stores all titles and notes, as well as clipboard
Str7 - stored back into str9 when done editing
A - Y value for cursor (starts at 12, increments by 8)
B - X value for cursor (can be 31 or 87)
C - Notes list page number (1 through 99)
(Temporary) D - used to display wanted text, starting at D
(Temporary) E - pretty much same as D (can be combined then?)
F - used in combo with A/4 to specify note #
(Temporary) I - used to add a note
K - keypress
(Temporary) M - used to display titles
P - if new note is created or just clicking on a note
Z - if you del all notes, it goes to the beginning of basicnote (basically a reset)

Text Editor

Code:
str6 - the title that can be edited
Str7 - holds the current note being edited
str8 - temporary string that contains the single character input
A - Y value of text cursor
B - X value of text cursor
C - page number for note (yet to be added)
(Temporary) G - used in display
K - keypress
M - directional value for highlighting
(Temporary) O - used in combo with G
R - state of the alpha key
S - state of the 2nd key
V - moves with the cursor if highlighting
X - original spot that highlighting started (constant)
New title input. I tried mixing it in with the rest of the text editor for full functionality, but it seemed a bit too hard and not worth it. so, for the title, you can only input capital letters A-Z, you can backspace, and you can clear the title. now, actually getting it to replace the previously written title is a bit tricky. also, as you can see in the gif, the second note i wrote went into the first notes area, which is obviously not wanted. I am fairly positive that it is a problem with variable D, and could be caused by the "For(E" loop.

screenie:

i used str6 conveniently for the title, which is stored back into str9 when you finish inputting/editing it. there are several bugs, but I will make a separate post for that. for example, I tried moving my cursor around in the text editor, but nothing worked. can't even highlight, move, or do anything other than just inputting text. very strange. oh, and btw, I have not implemented the display of the note yet. It only displays the title. I will have to make it so that when you click on the note, it displays the note char by char, which is slow, but the only way I can think of. if you can improve my methods please do Smile

also, I finally inserted the text editor code into the menu program, so it is now one big ginormous chunk of code...

Code:
:DCS6
"000000003FFC20042CC42AA42CA42AA42CA4200427F420042FF420043FFC0000"
CoordOff:GridOff:AxesOff
0->Xmin:1->DeltaX
0->Ymin:1->DeltaY
SetUpEditor TIBN
If not(dim(|LTIBN
Then
" ->Str9
6->dim(|LTIBN
End
UnArchive Str9
33->Z
While Z=33 or (A=12 and B=31 and K!=22
DelVar ZClrDraw
Horizontal 52
Horizontal 51
Text(~1,1,1,"BasicNote
StorePic 1
Text(~1,1,32,"Note
RecallPic 1
DelVar Pic1Line(35,4,35,50
Line(94,4,94,50
Line(0,4,0,50
For(A,51,3,~8
Horizontal A
End
Text(12,2,"NEW NOTE
Text(20,2,"DEL ALL
Text(28,2,"SEARCH
1->B:Ans->C
For(A,1,6)
If |LTIBN(6(C-1)+A
Then
Text(8A+4,41,sub(Str9,inString(Str9,"[xhat]T",B)+3,inString(Str9,"[xhat]N",B)-(3+inString(Str9,"[xhat]T",B
2+inString(Str9,"[xhat]E",B)->B
End:End
12->A:31->B
Repeat K=22 or Z=33 or (B=87 and |LTIBN(6(C-1)+(A/4-F))) or (A=12 and B=31
0->P
Repeat sum(K={22,105
Text(3,87,C
getKey->K
Text(A,B,"+
If K:Then
Text(A,B,"   
If (K=34 and A=52 and dim(|LTIBN)>6C) or (K=25 and A=12:Then
If K=25 or (K=34 and |LTIBN(1+6C-6(K=25):Then
4(K=34)+60(K=25->A:C+(K=34)-(K=25->C:1->D
For(M,1,6C-6
2+inString(Str9,"[xhat]E",D->D
End
For(M,1,6
Text(8M+4,41,"                                                     
If dim(|LTIBN)>6(C-1)+M:Then
If |LTIBN(6(C-1)+M
Then
Text(8M+4,41,sub(Str9,inString(Str9,"[xhat]T",D)+3,inString(Str9,"[xhat]N",D)-(3+inString(Str9,"[xhat]T",D
2+inString(Str9,"[xhat]E",D)->D
End:End:End:End:End
A+8(K=34)(A<20)(B=31)-8(K=25)(A>12)+8(K=34)(B=87)(A<52)-(A-20)(K=24)(A>12->A
B+56(K=26)(B=31)-56(K=24)(B=87->B
End
round(A/7.5,0->F
Text(A,B,"+
End
If K=105:Then
StorePic 1
If B=31 or (B=87 and |LTIBN(6(C-1)+(A/4-F
Then
If A=20 and B=31:Then
For(I,12,58,8
Text(~1,I,0,"                 
End:End
If B=31:Then
If A=12:Then
1->E
If 1<dim(|LTIBN
Then
DelVar I
Repeat not(|LTIBN(I
I+1->I
If |LTIBN(I
2+inString(Str9,"[xhat]T",E->E
End:End
Str9+"[xhat]T ->Str9
1->I
Repeat not(|LTIBN(I
If |LTIBN(I
I+1->I
End
1->|LTIBN(I
If not(fPart(I/6
dim(|LTIBN)+6->dim(|LTIBN
1->P
End
If A=20:Then
Text(~1,13,1,"DEL ALL NOTES?
Text(~1,23,13,"CANCEL
Text(~1,33,13,"DELETE
23->Z
Repeat K=105
getKey->K
Text(~1,Z,1,">
If K:Then
Text(~1,Z,1,"
Z+10(K=34)(Z=23)-10(K=25)(Z=33->Z
End:End
If Z=33:Then
" ->Str9
Fill(0,|LTIBN
Text(~1,43,1,"DELETED
rand(30
End
If Z=23:Then
ClrDraw
RecallPic 1
End:End:End
DelVar K
If P or B=87:Then
1->D
If |LTIBN(2:Then
For(E,1,6(C-1)+A/4-F-1
2+inString(Str9,"[xhat]E",D->D
End:End
ClrDraw
If not(P
Text(0,1,sub(Str9,inString(Str9,"[xhat]T",D)+2,inString(Str9,"[xhat]N",D)-(2+inString(Str9,"[xhat]T",D
Horizontal 55
DelVar XDelVar RDelVar S
1->C
Text(0,69,C
Text(0,77,"/99
Line(89,55,89,62
Line(67,55,67,62
DelVar B8->A
If P:Then
"  ->Str7
" ->Str6
Lbl TT
Repeat length(Str6)>1 and (K=34 or K=105
If 1=length(Str6
Text(0,1,"ENTER TITLE
Repeat Ans
getKey->K
End
Ans-20-5int(.1Ans
If 12>length(Str6) and 0<Ans and Ans<29 and K!=44 and K!=45:Then
If 1=length(Str6
Text(0,1,"                                           
Str6+sub("ABC  DEFGHIJKLMNOPQRSTUVWXYZ",Ans,1->Str6
End
If K=23 and length(Str6)>1:Then
sub(Str6,1,length(Str6)-1->Str6
Text(0,1,Str6+"   
End
If K=45:Then
" ->Str6
Text(0,1,"                                           
End
Text(0,1,Str6
End:End
If P
Str9+sub(Str6,2,length(Str6)-1)+"[xhat]N[xhat]E->Str9
If not(P
sub(Str9,1,D+2)+sub(Str6,2,length(Str6)-1)+sub(Str9,inString(Str9,"[xhat]N",D),length(Str9)-(1+inString(Str9,"[xhat]N",D->Str9
0->P
Repeat K=22 or K=11
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 X and (not(S) or (S and not(sum(K={24,25,26,34:Then
For(theta,48,0,~6
Line(0,theta,94,theta,0
End
DelVar XDelVar M
End
If R:sub("abc  defghijklMnopqrstuvWxyztheta'  :?ABC  DEFGHIJKLMNOPQRSTUVWXYZtheta'  :?",1+34(R-1),34
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
End
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
23int(A/6-1)+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 sum(K={24,25,26,34:Then
If A>8 and K=24 and not(B:Then
92->B:A-6->A:End
If not(S:Then
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
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-2)+(B-4(K-25))/4+1))+(B-4(K-25))/4+2>length(Str7:Then
If S:Line(B,62-A,94,62-A,M=sum(K={26,34
4((length(Str7)-2)-23int(length(Str7)/23->B
If S:Then
23int(A/6-1)+Ans/4+2->V
Line(0,56-A,B,56-A,M=sum(K={26,34
End:End
If S:Then
If (length(Str7)>23int(A/6-1)+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
If not(X:Then
sum(K={26,34->M:23int(A/6-1)+B/4+2->X
End
Line(B,62-A-6,B+4((K=26)-(K=24)),62-A-6,M=sum(K={26,34
B+4(K-25->B
23int(A/6-1)+Ans/4+2->V
If V=X
DelVar XDelVar M
End:End: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(O,(B+1)(G=int(A/6))+(G>int(A/6)),8+int(3.87Ans),4
If theta=23 or 23(G-1)+(O-1)/4<length(Str7
sub(Str7,23G-20-2(O>5)+int(O/4)(23G-20-2(O>5)+int(O/4)<=length(Str7)),1
If Ans="
"   
If O>5 and not(inString("wm",Ans)) and (theta=23 or 23(G-1)+(O-1)/4<length(Str7
Text(6G+2,O-8,Ans
If inString("wm",Ans:Then
Text(6G+2,O-8,sub("WM",inString("wm",Ans),1
Line(O,61-(6G+2),O+2,61-(6G+2),0
Pt-Off(O+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
If K=11:Goto TT
0->K
ClrDraw
sub(Str9,1,inString(Str9,"[xhat]N",D)+1)+Str7+sub(Str9,inString(Str9,"[xhat]N",D)+2,length(Str9)-(1+inString(Str9,"[xhat]N",D->Str9
12->A:31->B:1->C
End:End:End:End
If K!=22:Pause
DelVar Pic1ClrDraw
ClrHome
Output(1,1,"
((sorry for several posts in a row, but I wanted to make this a separate post completely))

Here I will post all the bugs and other things I need to complete and/or fix. There are several I have encountered along the way, but I have forgotten some. I will add them as I find new ones and mark them off when they are fixed. If you find any new ones, tell me Smile

Things to Fix/Optimize

FIXED Very Happy || FIX VARIABLE D - trying to display a note that is note #2 or higher does not work. it gets stuck at displaying 2 or errors out. along with that, storing notes/titles back into str9 when done editing is screwed up.

FIXED || can hardly do anything in text editor. no cursor movement, highlighting, etc etc

NOT FIXED || pasting doesn't paste what you think you copied. EX: copying " NOTE" in "4TH NOTE" and pasting it pastes " 4TH" instead.

NOT FIXED || cursor is able to move straight down even when the string does not reach that far. it should be moving backwards to the length(str7) but it doesn't

FIXED || if any functions are entered in y=, they might be drawn

MUCH FASTER || display of the note when going to edit one is slow, because it renders char by char. I wonder if there is a faster way to do it, while making sure all chars appear as 3 pixels in width.

...and more bugs I may have forgot. Will post when i discover them again
I like the new title input, its better than an Input command an make everything feel pretty seemless. Smile
When you edit a note, and then going back to your homescreen, you must overwrite the previous content of that note. That is done in this part of the code:

Code:
 sub( Str9 , 1, inString
( Str9 ,"[ xhat ] N ", D )+ 1)+ Str7 + sub
( Str9 ,inString
( Str9 ,"[ xhat ] N ", D )+ 2,  (Str9 )-( 1+ inString ( Str9 , "[xhat ] N ", D -> Str9
, which is at the last lines of your big code.
But when you trace down that, you get weird results. Let's say Str 9 =
"XTtitleXNnote-contentXE", where the capital X is the xhat. if Str7 = "new-content", then you get:
sub(Str9,1,9) = XTtitleXN
Str7 = new-content.
sub(Str9,10,end) = note-contentXE
This is the result: XTtitleXNnew-contentnote-contentXE or something like that.
You could change it by replacing the last two XN's with XE.

Edit: remove the -1 at For( E ,1,6( C- 1)+ A/ 4- F -1

I hope soooo this helps!!!⁻ยน
This is looking really good. When you finish, I am going to download it and use it on my TI-84+CSE because it is in pure basic and if I want I can just multiply a ton of stuff by 2.5 to get it all proportional to the graph screen size on the CSE.
Lots of bug fixing....

I am pretty sure there is a problem with D. It always seems to be 1, which is why when I write something in the 2nd note it replaces the first note in str9 instead. what may be relevant is the part "For(E,1,6(C-1)+A/4-F-1". you can do ctrl+f if you need to.

Code:
:DCS6
"000000003FFC20042CC42AA42CA42AA42CA4200427F420042FF420043FFC0000"
CoordOff:GridOff:AxesOff
0->Xmin:1->DeltaX
0->Ymin:1->DeltaY
SetUpEditor TIBN
If not(dim(|LTIBN
Then
" ->Str9
6->dim(|LTIBN
End
UnArchive Str9
33->Z
While Z=33 or (A=12 and B=31 and K!=22
DelVar ZClrDraw
Horizontal 52
Horizontal 51
Text(~1,1,1,"BasicNote
StorePic 1
Text(~1,1,32,"Note
RecallPic 1
DelVar Pic1Line(35,4,35,50
Line(94,4,94,50
Line(0,4,0,50
For(A,51,3,~8
Horizontal A
End
Text(12,2,"NEW NOTE
Text(20,2,"DEL ALL
Text(28,2,"SEARCH
1->B:Ans->C
For(A,1,6)
If |LTIBN(6(C-1)+A
Then
Text(8A+4,41,sub(Str9,inString(Str9,"[xhat]T",B)+3,inString(Str9,"[xhat]N",B)-(3+inString(Str9,"[xhat]T",B
2+inString(Str9,"[xhat]E",B)->B
End:End
12->A:31->B
Repeat K=22 or Z=33 or (B=87 and |LTIBN(6(C-1)+(A/4-F))) or (A=12 and B=31
0->P
Repeat sum(K={22,105
Text(3,87,C
getKey->K
Text(A,B,"+
If K:Then
Text(A,B,"   
If (K=34 and A=52 and dim(|LTIBN)>6C) or (K=25 and A=12:Then
If K=25 or (K=34 and |LTIBN(1+6C-6(K=25):Then
4(K=34)+60(K=25->A:C+(K=34)-(K=25->C:1->D
For(M,1,6C-6
2+inString(Str9,"[xhat]E",D->D
End
For(M,1,6
Text(8M+4,41,"                                                     
If dim(|LTIBN)>6(C-1)+M:Then
If |LTIBN(6(C-1)+M
Then
Text(8M+4,41,sub(Str9,inString(Str9,"[xhat]T",D)+3,inString(Str9,"[xhat]N",D)-(3+inString(Str9,"[xhat]T",D
2+inString(Str9,"[xhat]E",D)->D
End:End:End:End:End
A+8(K=34)(A<20)(B=31)-8(K=25)(A>12)+8(K=34)(B=87)(A<52)-(A-20)(K=24)(A>12->A
B+56(K=26)(B=31)-56(K=24)(B=87->B
End
round(A/7.5,0->F
Text(A,B,"+
End
If K=105:Then
StorePic 1
If B=31 or (B=87 and |LTIBN(6(C-1)+(A/4-F
Then
If A=20 and B=31:Then
For(I,12,58,8
Text(~1,I,0,"                 
End:End
If B=31:Then
If A=12:Then
1->E
If 1<dim(|LTIBN
Then
DelVar I
Repeat not(|LTIBN(I
I+1->I
If |LTIBN(I
2+inString(Str9,"[xhat]T",E->E
End:End
Str9+"[xhat]T ->Str9
1->I
Repeat not(|LTIBN(I
If |LTIBN(I
I+1->I
End
1->|LTIBN(I
If not(fPart(I/6
dim(|LTIBN)+6->dim(|LTIBN
1->P
End
If A=20:Then
Text(~1,13,1,"DEL ALL NOTES?
Text(~1,23,13,"CANCEL
Text(~1,33,13,"DELETE
23->Z
Repeat K=105
getKey->K
Text(~1,Z,1,">
If K:Then
Text(~1,Z,1,"
Z+10(K=34)(Z=23)-10(K=25)(Z=33->Z
End:End
If Z=33:Then
" ->Str9
Fill(0,|LTIBN
Text(~1,43,1,"DELETED
rand(30
End
If Z=23:Then
ClrDraw
RecallPic 1
End:End:End
DelVar K
If P or B=87:Then
1->D
If |LTIBN(2:Then
For(E,1,6(C-1)+A/4-F-1
2+inString(Str9,"[xhat]E",D->D
End:End
ClrDraw
If not(P
Text(0,1,sub(Str9,inString(Str9,"[xhat]T",D)+2,inString(Str9,"[xhat]N",D)-(2+inString(Str9,"[xhat]T",D
Horizontal 55
DelVar XDelVar RDelVar S
1->C
Text(0,69,C
Text(0,77,"/99
Line(89,55,89,62
Line(67,55,67,62
DelVar B8->A
If P:Then
"  ->Str7
" ->Str6
Lbl TT
Repeat length(Str6)>1 and (K=34 or K=105
If 1=length(Str6
Text(0,1,"ENTER TITLE
Repeat Ans
getKey->K
End
Ans-20-5int(.1Ans
If 12>length(Str6) and 0<Ans and Ans<29 and K!=44 and K!=45:Then
If 1=length(Str6
Text(0,1,"                                           
Str6+sub("ABC  DEFGHIJKLMNOPQRSTUVWXYZ",Ans,1->Str6
End
If K=23 and length(Str6)>1:Then
sub(Str6,1,length(Str6)-1->Str6
Text(0,1,Str6+"   
End
If K=45:Then
" ->Str6
Text(0,1,"                                           
End
Text(0,1,Str6
End:End
If P
Str9+sub(Str6,2,length(Str6)-1)+"[xhat]N[xhat]E->Str9
If not(P:Then
sub(Str9,1,D+2)+sub(Str6,2,length(Str6)-1)+sub(Str9,inString(Str9,"[xhat]N",D),length(Str9)-(1+inString(Str9,"[xhat]N",D->Str9
sub(Str9,inString(Str9,"[xhat]N",D)+2,inString(Str9,"[xhat]E",D)-(2+inString(Str9,"[xhat]N",D->Str7



End
0->P
Repeat K=22 or K=11
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 X and (not(S) or (S and not(sum(K={24,25,26,34:Then
For(theta,48,0,~6
Line(0,theta,94,theta,0
End
DelVar XDelVar M
End
If R:sub("abc  defghijklMnopqrstuvWxyztheta'  :?ABC  DEFGHIJKLMNOPQRSTUVWXYZtheta'  :?",1+34(R-1),34
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
End
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
23int(A/6-1)+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 sum(K={24,25,26,34:Then
If A>8 and K=24 and not(B:Then
92->B:A-6->A:End
If not(S:Then
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
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-2)+(B-4(K-25))/4+1))+(B-4(K-25))/4+2>length(Str7:Then
If S:Line(B,62-A,94,62-A,M=sum(K={26,34
4((length(Str7)-2)-23int(length(Str7)/23->B
If S:Then
23int(A/6-1)+Ans/4+2->V
Line(0,56-A,B,56-A,M=sum(K={26,34
End:End
If S:Then
If (length(Str7)>23int(A/6-1)+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
If not(X:Then
sum(K={26,34->M:23int(A/6-1)+B/4+2->X
End
Line(B,62-A-6,B+4((K=26)-(K=24)),62-A-6,M=sum(K={26,34
B+4(K-25->B
23int(A/6-1)+Ans/4+2->V
If V=X
DelVar XDelVar M
End:End: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(O,(B+1)(G=int(A/6))+(G>int(A/6)),8+int(3.87Ans),4
If theta=23 or 23(G-1)+(O-1)/4<length(Str7
sub(Str7,23G-20-2(O>5)+int(O/4)(23G-20-2(O>5)+int(O/4)<=length(Str7)),1
If Ans="
"   
If O>5 and not(inString("wm",Ans)) and (theta=23 or 23(G-1)+(O-1)/4<length(Str7
Text(6G+2,O-8,Ans
If inString("wm",Ans:Then
Text(6G+2,O-8,sub("WM",inString("wm",Ans),1
Line(O,61-(6G+2),O+2,61-(6G+2),0
Pt-Off(O+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
If K=11:Goto TT
0->K
ClrDraw
sub(Str9,1,inString(Str9,"[xhat]N",D)+1)+Str7+sub(Str9,inString(Str9,"[xhat]E",D),length(Str9)+(1-inString(Str9,"[xhat]E",D->Str9
12->A:31->B:1->C
End:End:End:End
If K!=22:Pause
DelVar Pic1ClrDraw
ClrHome
Output(1,1,"
As I said, remove the -1. Hope that helps
PT_ wrote:
As I said, remove the -1. Hope that helps

that helped a tiny bit, but what happens now is that the second note gets replaced when you finish editing the 3rd note or higher, so... gonna need something else
Michael2_3B wrote:
PT_ wrote:
As I said, remove the -1. Hope that helps

that helped a tiny bit, but what happens now is that the second note gets replaced when you finish editing the 3rd note or higher, so... gonna need something else

For(E,1,(6C-6+A)/(4-F ? I know nothing about this, but I hope it'll help!
JWinslow23 wrote:
Michael2_3B wrote:
PT_ wrote:
As I said, remove the -1. Hope that helps

that helped a tiny bit, but what happens now is that the second note gets replaced when you finish editing the 3rd note or higher, so... gonna need something else

For(E,1,(6C-6+A)/(4-F ? I know nothing about this, but I hope it'll help!

Nope, that doesn't work :/ that just goes back to the first problem, replacing the first note with the second note.

I think what I need is something like For(E,1,6(C-1)+A/4-F+<number>). Since setting <number>=0, it makes it work for the first 2 notes, but then replaces the second note with the third note if you do a third note. So, maybe <number> could start at 0 on the second note, and increment by 1 the higher the note number?
(read my previous post)

for <number>, I did the same exact thing but with -2 on it, that way it adds 0 if on note 2, 1 if on note 3, etc., so the entire thing would be
Code:
For(E,1,6(C-1)+A/4-F+(6(C-1)+A/4-F-2

...but that just returns to the original problem - the first note getting replaced. anybody got any ideas how to fix it...?? what I'm wanting is that if on the first note, D is the value of first appearance of [xhat]T, if on second note, D is the value of the second appearance of [xhat]T, etc etc.

this isn't necessary, but here's the entire loop:

Code:
1->D
If |LTIBN(2:Then
For(E,1,6(C-1)+A/4-F+(6(C-1)+A/4-F-2
2+inString(Str9,"[xhat]E",D->D
End:End
When editing, creating or deleting a note, it returns, but I don't know how. Have no time yet to look at it. Here is the code:
Code:
:DCS6
"000000003FFC20042CC42AA42CA42AA42CA4200427F420042FF420043FFC0000"
CoordOff
GridOff
AxesOff
0->Xmin
1->DeltaX
0->Ymin
1->DeltaY
SetUpEditor TIBN
If not(dim(|LTIBN
Then
   " ->Str9
   6->dim(|LTIBN
End
UnArchive Str9
33->Z
While Z=33 or (A=12 and B=31 and K!=22
   3->D
   {2->|LTIBN2
   While D>2
      2+inString(Str9,"[xhat]T",D->D
      augment(|LTIBN2,{Ans-2->|LTIBN2
   End
   DelVar ZClrDraw
   Horizontal 52
   Horizontal 51
   Text(~1,1,1,"BasicNote
   StorePic 1
   Text(~1,1,32,"Note
   RecallPic 1
   Line(35,4,35,50
   Line(94,4,94,50
   Line(0,4,0,50
   For(A,51,3,~8
      Horizontal A
   End
   Text(12,2,"NEW NOTE
   Text(20,2,"DEL ALL
   Text(28,2,"SEARCH
   1->B
   DelVar CFor(A,1,6
      If |LTIBN(6C+A
      Then
         Text(8A+4,41,sub(Str9,|LTIBN2(6C+A)+2,inString(Str9,"[xhat]N",B)-2-|LTIBN2(6C+A
         2+inString(Str9,"[xhat]E",B->B
      End
   End
   12->A
   31->B
   Repeat K=22 or Z=33 or (B=87 and |LTIBN(6C+A/4-F)) or (A=12 and B=31
   Repeat A=12 and B=31 or K=22 or Z=33 or B=87 and |LTIBN(6C+A/4-F
      DelVar PRepeat sum(K={22,105
         Text(3,87,C+1
         getKey->K
         Text(A,B,"+
         If K
         Then
            Text(A,B,"   
            If K=25 and A=12 or K=34 and A=52
            Then
               If K=25 or K=34 and |LTIBN(6C+7-6(K=25
               Then
                  4(K=34)+60(K=25->A
                  max(0,min(int(dim(|LTIBN2)/6),C+sum(DeltaList(K={25,34->C
                  1->D
                  For(M,1,6C
                     2+inString(Str9,"[xhat]E",D->D
                  End
                  For(M,1,6
                     Text(8M+4,41,"                                                     
                     If |LTIBN(6C+M
                     Then
                        Text(8M+4,41,sub(Str9,|LTIBN2(6C+M)+2,inString(Str9,"[xhat]N",D)-2-|LTIBN2(6C+M
                        2+inString(Str9,"[xhat]E",D->D
                     End
                  End
               End
            End
            max(12,min(28+24(B=87),A+8sum(DeltaList(K={25,34->A
            max(31,min(87,B+56sum(DeltaList(K={24,26->B
         End
         1+int(A/8->F
      End
      If K=105
      Then
         StorePic 1
         If B=31 or (B=87 and |LTIBN(6C+A/4-F
         Then
            If A=20 and B=31
            Then
               For(I,12,58,8
                  Text(~1,I,0,"                 
               End
            End
            If B=31
            Then
               If A=12
               Then
                  1->E
                  If 1<dim(|LTIBN
                  Then
                     DelVar I
                     Repeat not(|LTIBN(I
                        I+1->I
                        If |LTIBN(I
                           2+inString(Str9,"[xhat]T",E->E
                     End
                  End
                  Str9+"[xhat]T->Str9
                  1->I
                  Repeat not(|LTIBN(I
                     If |LTIBN(I
                        I+1->I
                  End
                  1->|LTIBN(I
                  If not(fPart(I/6
                     dim(|LTIBN)+6->dim(|LTIBN
                  1->P
               End
               If A=20
               Then
                  Text(~1,13,1,"DEL ALL NOTES?
                  Text(~1,23,13,"CANCEL
                  Text(~1,33,13,"DELETE
                  23->Z
                  Repeat K=105
                     getKey->K
                     Text(~1,Z,1,">
                     If K
                     Then
                        Text(~1,Z,1,"
                        Z+10(K=34)(Z=23)-10(K=25)(Z=33->Z
                     End
                  End
                  If Z=33
                  Then
                     " ->Str9
                     Fill(0,|LTIBN
                     Text(~1,43,1,"DELETED
                     rand(30
                  End
                  If Z=23
                  Then
                     ClrDraw
                     RecallPic 1
                  End
               End
            End
            DelVar K
            If P or B=87
            Then
               1->D
               If |LTIBN(2
               Then
                  For(E,1,6C+A/4-F-1
                     2+inString(Str9,"[xhat]E",D->D
                  End
               End
               ClrDraw
               If not(P
                  Text(0,1,sub(Str9,|LTIBN2(6C+A/4-F)+2,inString(Str9,"[xhat]N",D)-2-|LTIBN2(6C+A/4-F
               Horizontal 55
               // EDITOR //
               DelVar XDelVar RDelVar S1->C
               Text(0,69,C
               Text(0,77,"/99
               Line(89,55,89,62
               Line(67,55,67,62
               DelVar B8->A
               If P
               Then
                  "  ->Str7
                  " ->Str6
                  Lbl TT
                  Repeat length(Str6)>1 and (K=34 or K=105
                     If 1=length(Str6
                        Text(0,1,"ENTER TITLE
                     Repeat Ans
                        getKey->K
                     End
                     Ans-20-5int(.1Ans
                     If 12>length(Str6) and 0<Ans and Ans<29 and K!=44 and K!=45
                     Then
                        If 1=length(Str6
                           Text(0,1,"                                           
                        Str6+sub("ABC  DEFGHIJKLMNOPQRSTUVWXYZ",Ans,1->Str6
                     End
                     If K=23 and length(Str6)>1
                     Then
                        sub(Str6,1,length(Str6)-1->Str6
                        Text(0,1,Str6+"   
                     End
                     If K=45
                     Then
                        " ->Str6
                        Text(0,1,"                                           
                     End
                     Text(0,1,Str6
                  End
                  augment(|LTIBN2,{length(Str9)-1->|LTIBN2
               End
               If P
                  Str9+sub(Str6,2,length(Str6)-1)+"[xhat]N  [xhat]E->Str9
               If not(P
                  sub(Str9,inString(Str9,"[xhat]N",D)+2,inString(Str9,"[xhat]E",D)-(2+inString(Str9,"[xhat]N",D->Str7
               DelVar P
               Repeat K=22 or K=11
                  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 X and (not(S) or (S and not(sum(K={24,25,26,34
                     Then
                        For(theta,48,0,~6
                           Line(0,theta,94,theta,0
                        End
                        DelVar XDelVar MEnd
                     If R
                        sub("abc  defghijklMnopqrstuvWxyztheta'  :?ABC  DEFGHIJKLMNOPQRSTUVWXYZtheta'  :?",1+34(R-1),34
                     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
                        End
                        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
                        23int(A/6-1)+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 sum(K={24,25,26,34
                  Then
                     If A>8 and K=24 and not(B
                     Then
                        92->B
                        A-6->A
                     End
                     If not(S
                     Then
                        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
                     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-2)+(B-4(K-25))/4+1))+(B-4(K-25))/4+2>length(Str7
                        Then
                           If S
                              Line(B,62-A,94,62-A,M=sum(K={26,34
                           4((length(Str7)-2)-23int(length(Str7)/23->B
                           If S
                           Then
                              23int(A/6-1)+Ans/4+2->V
                              Line(0,56-A,B,56-A,M=sum(K={26,34
                           End
                        End
                        If S
                        Then
                           If (length(Str7)>23int(A/6-1)+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
                              If not(X
                              Then
                                 sum(K={26,34->M
                                 23int(A/6-1)+B/4+2->X
                              End
                              Line(B,62-A-6,B+4((K=26)-(K=24)),62-A-6,M=sum(K={26,34
                              B+4(K-25->B
                              23int(A/6-1)+Ans/4+2->V
                              If V=X
                                 DelVar XDelVar M
                           End
                        End
                     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(O,(B+1)(G=int(A/6))+(G>int(A/6)),8+int(3.87Ans),4
                              If theta=23 or 23(G-1)+(O-1)/4<length(Str7
                                 sub(Str7,23G-20-2(O>5)+int(O/4)(23G-20-2(O>5)+int(O/4)<=length(Str7)),1
                              If Ans="
                                 "   
                              If O>5 and not(inString("wm",Ans)) and (theta=23 or 23(G-1)+(O-1)/4<length(Str7
                                 Text(6G+2,O-8,Ans
                              If inString("wm",Ans
                              Then
                                 Text(6G+2,O-8,sub("WM",inString("wm",Ans),1
                                 Line(O,61-(6G+2),O+2,61-(6G+2),0
                                 Pt-Off(O+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
               If K=11
                  Goto TT
               DelVar K
               ClrDraw
               // EDITOR //
               sub(Str9,1,inString(Str9,"[xhat]N",D)+1)+Str7+sub(Str9,inString(Str9,"[xhat]E",D),length(Str9)+(1-inString(Str9,"[xhat]E",D->Str9
               12->A
               31->B
               1->C
            End
         End
      End
   End
   If K!=22
      Pause
   DelVar Pic1
   ClrDraw
   ClrHome
   "
or
Code:
:DCS6
"000000003FFC20042CC42AA42CA42AA42CA4200427F420042FF420043FFC0000"
CoordOff
GridOff
AxesOff
0->Xmin
1->DeltaX
0->Ymin
1->DeltaY
SetUpEditor TIBN
If not(dim(|LTIBN
Then
" ->Str9
6->dim(|LTIBN
End
UnArchive Str9
33->Z
While Z=33 or (A=12 and B=31 and K!=22
3->D
{2->|LTIBN2
While D>2
2+inString(Str9,"[xhat]T",D->D
augment(|LTIBN2,{Ans-2->|LTIBN2
End
DelVar ZClrDraw
Horizontal 52
Horizontal 51
Text(~1,1,1,"BasicNote
StorePic 1
Text(~1,1,32,"Note
RecallPic 1
Line(35,4,35,50
Line(94,4,94,50
Line(0,4,0,50
For(A,51,3,~8
Horizontal A
End
Text(12,2,"NEW NOTE
Text(20,2,"DEL ALL
Text(28,2,"SEARCH
1->B
DelVar CFor(A,1,6
If |LTIBN(6C+A
Then
Text(8A+4,41,sub(Str9,|LTIBN2(6C+A)+2,inString(Str9,"[xhat]N",B)-2-|LTIBN2(6C+A
2+inString(Str9,"[xhat]E",B->B
End
End
12->A
31->B
Repeat K=22 or Z=33 or (B=87 and |LTIBN(6C+A/4-F)) or (A=12 and B=31
Repeat A=12 and B=31 or K=22 or Z=33 or B=87 and |LTIBN(6C+A/4-F
DelVar PRepeat sum(K={22,105
Text(3,87,C+1
getKey->K
Text(A,B,"+
If K
Then
Text(A,B,"   
If K=25 and A=12 or K=34 and A=52
Then
If K=25 or K=34 and |LTIBN(6C+7-6(K=25
Then
4(K=34)+60(K=25->A
max(0,min(int(dim(|LTIBN2)/6),C+sum(DeltaList(K={25,34->C
1->D
For(M,1,6C
2+inString(Str9,"[xhat]E",D->D
End
For(M,1,6
Text(8M+4,41,"                                                     
If |LTIBN(6C+M
Then
Text(8M+4,41,sub(Str9,|LTIBN2(6C+M)+2,inString(Str9,"[xhat]N",D)-2-|LTIBN2(6C+M
2+inString(Str9,"[xhat]E",D->D
End
End
End
End
max(12,min(28+24(B=87),A+8sum(DeltaList(K={25,34->A
max(31,min(87,B+56sum(DeltaList(K={24,26->B
End
1+int(A/8->F
End
If K=105
Then
StorePic 1
If B=31 or (B=87 and |LTIBN(6C+A/4-F
Then
If A=20 and B=31
Then
For(I,12,58,8
Text(~1,I,0,"                 
End
End
If B=31
Then
If A=12
Then
1->E
If 1<dim(|LTIBN
Then
DelVar I
Repeat not(|LTIBN(I
I+1->I
If |LTIBN(I
2+inString(Str9,"[xhat]T",E->E
End
End
Str9+"[xhat]T->Str9
1->I
Repeat not(|LTIBN(I
If |LTIBN(I
I+1->I
End
1->|LTIBN(I
If not(fPart(I/6
dim(|LTIBN)+6->dim(|LTIBN
1->P
End
If A=20
Then
Text(~1,13,1,"DEL ALL NOTES?
Text(~1,23,13,"CANCEL
Text(~1,33,13,"DELETE
23->Z
Repeat K=105
getKey->K
Text(~1,Z,1,">
If K
Then
Text(~1,Z,1,"
Z+10(K=34)(Z=23)-10(K=25)(Z=33->Z
End
End
If Z=33
Then
" ->Str9
Fill(0,|LTIBN
Text(~1,43,1,"DELETED
rand(30
End
If Z=23
Then
ClrDraw
RecallPic 1
End
End
End
DelVar K
If P or B=87
Then
1->D
If |LTIBN(2
Then
For(E,1,6C+A/4-F-1
2+inString(Str9,"[xhat]E",D->D
End
End
ClrDraw
If not(P
Text(0,1,sub(Str9,|LTIBN2(6C+A/4-F)+2,inString(Str9,"[xhat]N",D)-2-|LTIBN2(6C+A/4-F
Horizontal 55
// EDITOR //
DelVar XDelVar RDelVar S1->C
Text(0,69,C
Text(0,77,"/99
Line(89,55,89,62
Line(67,55,67,62
DelVar B8->A
If P
Then
"  ->Str7
" ->Str6
Lbl TT
Repeat length(Str6)>1 and (K=34 or K=105
If 1=length(Str6
Text(0,1,"ENTER TITLE
Repeat Ans
getKey->K
End
Ans-20-5int(.1Ans
If 12>length(Str6) and 0<Ans and Ans<29 and K!=44 and K!=45
Then
If 1=length(Str6
Text(0,1,"                                           
Str6+sub("ABC  DEFGHIJKLMNOPQRSTUVWXYZ",Ans,1->Str6
End
If K=23 and length(Str6)>1
Then
sub(Str6,1,length(Str6)-1->Str6
Text(0,1,Str6+"   
End
If K=45
Then
" ->Str6
Text(0,1,"                                           
End
Text(0,1,Str6
End
augment(|LTIBN2,{length(Str9)-1->|LTIBN2
End
If P
Str9+sub(Str6,2,length(Str6)-1)+"[xhat]N  [xhat]E->Str9
If not(P
sub(Str9,inString(Str9,"[xhat]N",D)+2,inString(Str9,"[xhat]E",D)-(2+inString(Str9,"[xhat]N",D->Str7
DelVar P
Repeat K=22 or K=11
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 X and (not(S) or (S and not(sum(K={24,25,26,34
Then
For(theta,48,0,~6
Line(0,theta,94,theta,0
End
DelVar XDelVar MEnd
If R
sub("abc  defghijklMnopqrstuvWxyztheta'  :?ABC  DEFGHIJKLMNOPQRSTUVWXYZtheta'  :?",1+34(R-1),34
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
End
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
23int(A/6-1)+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 sum(K={24,25,26,34
Then
If A>8 and K=24 and not(B
Then
92->B
A-6->A
End
If not(S
Then
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
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-2)+(B-4(K-25))/4+1))+(B-4(K-25))/4+2>length(Str7
Then
If S
Line(B,62-A,94,62-A,M=sum(K={26,34
4((length(Str7)-2)-23int(length(Str7)/23->B
If S
Then
23int(A/6-1)+Ans/4+2->V
Line(0,56-A,B,56-A,M=sum(K={26,34
End
End
If S
Then
If (length(Str7)>23int(A/6-1)+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
If not(X
Then
sum(K={26,34->M
23int(A/6-1)+B/4+2->X
End
Line(B,62-A-6,B+4((K=26)-(K=24)),62-A-6,M=sum(K={26,34
B+4(K-25->B
23int(A/6-1)+Ans/4+2->V
If V=X
DelVar XDelVar M
End
End
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(O,(B+1)(G=int(A/6))+(G>int(A/6)),8+int(3.87Ans),4
If theta=23 or 23(G-1)+(O-1)/4<length(Str7
sub(Str7,23G-20-2(O>5)+int(O/4)(23G-20-2(O>5)+int(O/4)<=length(Str7)),1
If Ans="
"   
If O>5 and not(inString("wm",Ans)) and (theta=23 or 23(G-1)+(O-1)/4<length(Str7
Text(6G+2,O-8,Ans
If inString("wm",Ans
Then
Text(6G+2,O-8,sub("WM",inString("wm",Ans),1
Line(O,61-(6G+2),O+2,61-(6G+2),0
Pt-Off(O+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
If K=11
Goto TT
DelVar K
ClrDraw
// EDITOR //
sub(Str9,1,inString(Str9,"[xhat]N",D)+1)+Str7+sub(Str9,inString(Str9,"[xhat]E",D),length(Str9)+(1-inString(Str9,"[xhat]E",D->Str9
12->A
31->B
1->C
End
End
End
End
If K!=22
Pause
DelVar Pic1
ClrDraw
ClrHome
"
Michael2_3B: What does the variable D represent? I might be able to help if you post your current code and what all the variables do. I don't know what you mean when you say that D always seems to be 1. Maybe when you enter a note, you can store the number of that note to D or something. If I understand what it does correctly, which I think I do not.
readroof2 wrote:
Michael2_3B: What does the variable D represent?

Variable D represents the start of a note in str9. so, for example, if i have 2 notes, and here's an example of str9 (all notes combined in a string)

Code:
" [xhat]T TITLE1[xhat]N  THIS IS NOTE 1[xhat]E[xhat]T ANOTHRTITLE[xhat]N  EXAMPLE TEXT IN NOTE 2! YAY![xhat]E"

then if i decided to edit note 2, D would equal 31 (the second placement of [xhat]T)

but for some reason D get's stuck at the second placement of [xhat]T and doesn't go further (like, when you create note 3 or edit note 3)

Also, the code in this post should be updated enough. I just need to fix D, and i'll put the fixed code into my slightly newer code. but the new stuff i have added recently doesn't have anything to do with D.
Some parts of your code (I'm looking at the version from the 14th) confuse me. For example, you have this line:

Code:
If K=25 or (K=34 and |LTIBN(1+6C-6(K=25):Then


There are two possible issues here:

* First, you don't need the parenthesis, because the and command has higher priority than the or command. (I see that PT_ had removed it in the fix.)

* Second, I don't think you need the -6(K=25) piecewise, because when K=34, which is the only situation it matters in, it will always return false. (The only way I could justify this would be if you'd otherwise go beyond the bounds of the list, but it looks like that's not the case since you've just gotten the value of K.)

Also, if I'm not mistaken, this block:

Code:
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


can be replaced with

Code:
If K=14 and X!=V
sub(Str9,1,1)+sub(Str7,min(X,V)+1,abs(X-V))+sub(Str9,2,length(Str9)-1->Str9

If the first character in Str9 is always " ", you can further replace the sub(Str9,1,1) with " ".

I also noticed that in this block, as well as some others:

Code:
If (K=34 and A=52 and dim(|LTIBN)>6C) or (K=25 and A=12:Then
the parenthesis at the start does nothing, and this:

Code:
If X and (not(S) or (S and not(sum(K={24,25,26,34:Then
can be

Code:
If X and not(S and max(K={24,25,26,34
or even:

Code:
If Xnot(S(K=34 or 2>abs(K=25

(It's customary to use max( rather than sum( because the former is often faster.)

EDIT: You may also be able to use a single variable for both the [2nd] and [ALPHA] states rather than using R and S.

Would it be possible to give a complete listing of how each real variable, list, and string is used throughout the code to facilitate debugging and optimization?

EDIT: I was informed that the variable listing is here.
lirtosiast wrote:

Code:
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

can be replaced with

Code:

If K=14 and X!=V


sub(Str9,1,1)+sub(Str7,min(X,V)+1,abs(X-V))+sub(Str9,2,length(Str9)-1->Str9

does that also take care of the fact that .01(var) can only go up to the 99? for example, V+.01X along with the sub() stuff would only go up to the 99th char for the X part. but with your min() thing, does that allow it to go to ~infinity?

I was originally just gonna change it to .000001X (or V) but now I'm curious if the min() solved it.
PT_: that didn't work. still need some way to fix D.

I'll see if I can look through my code line by line possibly and see what's wrong, but that will take a while. Help is appreciated! in the mean time, I think I will also start implementing some of the features I've been wanting to add, and the one feature I still need to add (which depends on D, however), which is the display of the note when you click on one to edit. other features like a search all notes function I may add here soon.

for anyone who doesn't know:
Michael2_3B wrote:
Variable D represents the start of a note in str9. so, for example, if i have 2 notes, and here's an example of str9 (all notes combined in a string)
Code:
" [xhat]T TITLE1[xhat]N  THIS IS NOTE 1[xhat]E[xhat]T ANOTHRTITLE[xhat]N  EXAMPLE TEXT IN NOTE 2! YAY![xhat]E"
then if i decided to edit note 2, D would equal 31 (the second placement of [xhat]T)
As I said on SAX, D is just 1 if you create a new note, which must be higher. What happens if you add that For(E - loop after creating a new note?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
» View previous topic :: View next topic  
Page 7 of 9
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement