The image shows the experimental set up for the various stages BUT, only post formatting to Main Feed is the problem.
A new post is made and added to Post Store as an unwrapped line, for easy addressing/manipulation.
Each line of the Posts Store is truncated after 170 characters, so it fits in less than 5 lines of the Main feed.
So I can get a single empty 5th line, I want to put the start of the subsequent line of Posts Store on the line below the 5th. As you see, I am working in modules of 5. 4 of text, 1 blank and so on.
The code should put the start of each truncated post on lines 6, 11,16,21..... But it starts 5 lines after the end of the text. Some text is less than 4 lines, so the module in Main Feed is not a multiple of 5 and I have 5 spaces, not on at the 5th module line.
The module of 5 is crucial to other functions.
Code: Select all
on mouseUp
set the lineDelimiter to return
put empty into field "Main feed"
put empty into counter
put 1 into MFcounter
repeat 10 times
put counter + 1 into counter
put char 1 to 170 of line counter of field "Posts store" into temp
put temp into line MFCounter of field "Main feed"
# answer counter, MFCounter
put counter * 5 into MFCounter
end repeat