IllogicTC commented on a Page, Sticky Note Custom Window  -  Dec 22, 2011

filter -fk notes.txt note_fill *

alias note_fill {
  tokenize 32 $1
  aline @Notes $2-
}

We can assume for this example that we will not encounter line runout. If we did, wouldn't INIs just have the same potential problem with runout anyway? Bringing INIs up because of the statement in the script description.

The script which handles note input can be made to either toss an error toward the user is the entered text is over X characters long, or if one wanted to take a more complicated route... Make the on INPUT automatically break up the lines at set amounts of characters, and enter each broken-up piece into the file with the ID. If an input is broken up, it can have $2 an identifier to show that it's part of the same line as before, which the filter's output alias would have to interpret. Then the problem should be the maximum length that mIRC can process on any one line.

Though, I do see your point. $read() with the S switch to find the first line (and of course strip out the ID code), and then continue reading until it determines that the next line is the beginning of another note? Then there would just need to be some sort of marker that shows that it is indeed the start of the next note.

var %string $read(notes.txt, S, $+($chr(186),NOTE_ID))
tokenize 32 %string
aline @Notes $2-
var %x $readn
:loop
inc %x
var %string $read(notes.txt,%x)
tokenize 32 %string
if ($chr(186) !isin $1) {
  aline @Notes $1-
  goto loop
}

Something like that? Use the degrees symbol or some other rarely-used symbol attached to the Note ID to give a pretty definite confirmation on if the next line is for the same note. $chr(186) could also be used as matchtext in a filter or something to grab the names of all currently stored notes, without having to maintain a separate list somewhere.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.