Hurray, no more left behind lines interrupting regular text or blank lines interrupting highlighted text! Here's the code:
Code:
Now, the only problem with this is that if the user does any action other than highlighting, the program can get "confused". You wouldn't want the user to highlight 2 separate things, right? Otherwise, even if the text is not highlighted in between, all text between the origin (X) and your cursor would be copied into the clipboard when you press [TRACE].
So, what I need now is to make it so that if a user does anything other than highlighting, it converts the highlighted text back to regular text. Which would take a few seconds, depending on how much is highlighted. Suggestions on this are welcome
Code:
If S and sum(K={24,26 //if second is activated and left or right arrow key pressed
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=54) or A>8 and A<54:Then
Line(B,62-A,B,57-A,MK=624 //if M=24 and K=26 or M=26 and K=24, draw a line, otherwise erase a line
For(F,B,B+3(K-25),K-25
For(G,A,A+5
Pxl-Change(G,F //highlighting stuff
End:End
If not(X:Then //if you just started highlighting (nothing else is highlighted)
K->M //store direction of highlighting in M
23round(A/6-1,0)+B/4+2->X //store the origin (where you started highlighting)
End
B+4(K-25->B
23round(A/6-1,0)+Ans/4+2->V //moves just the same as B, with your cursor
If V=X //if you are back at the origin (nothing is highlighted)
DelVar XDelVar M //get rid of the origin and direction of highlighting
End:End
Now, the only problem with this is that if the user does any action other than highlighting, the program can get "confused". You wouldn't want the user to highlight 2 separate things, right? Otherwise, even if the text is not highlighted in between, all text between the origin (X) and your cursor would be copied into the clipboard when you press [TRACE].
So, what I need now is to make it so that if a user does anything other than highlighting, it converts the highlighted text back to regular text. Which would take a few seconds, depending on how much is highlighted. Suggestions on this are welcome