Loading ...
Sorry, an error occurred while loading the content.

[Clip] clip request

Expand Messages
  • Jody
    Hi Granny and James, ... I added the ^!Set %incnum%=0 and ^!Inc %incnum% below to keep from getting the error in expression in
    Message 1 of 1 , Mar 21, 1999
    • 0 Attachment
      Hi Granny and James,

      > 1 have the user input how many lines he wants per page

      I added the ^!Set %incnum%=0 and ^!Inc %incnum% below
      to keep from getting the error in expression in
      ^$Calc(^%incnum%+trunc(^%page%))$ but I don't understand
      what your clip is doing. I think James was wanting it to
      start going through the doc leaving the cursor where the
      page would end and give him the time to insert a page break
      above it somewhere to keep anything from being split to
      the next page that I did not want. Next, that it would
      see my new page break and start its line count again from
      there and looping on till done. I might be wrong in what
      he wanted, but that is what I think it would be nice for it
      to do. Kind of like a book with chapter dividers. You
      wouldn't want chapter five to start at then end of chapter
      four in the middle of the page.

      I think this would be a great place to put in the code
      that loops waiting till it sees something in the doc, then
      replace it with a page break and continue on. You could do
      away with the timer and the person running the script
      wouldn't have to start all over if he missed a beat. :)
      This would be a loop inside your loop, or call it in another
      clip.

      H=RunNEditMode
      ; Type in "~~~" without the quotes to insert page break
      ; in place of them. Ctrl+Alt to end loop on this example.

      ^!Set %dm%=^[dddd, mmmmm, dd^]; %H%=^[hh^]; %M%=^[nn^]; %S%=^[ss^]

      :Loop
      ; long line
      ^!SetHintInfo You are on page ^%incnum% -- TYPE IN--> ~~~ <--to insert page break and continue -- Time: ^%H%:^%M%:^%S%
      ^!Delay 10
      ^!Inc %S%
      ^!If ^%S% = 60 Next Else Skip_3
      ^!Delay 1
      ^!Set %S%=1
      ^!Set %M%=^$[^%M%+1;0]
      ^!IfFalse ^$StrPos("~~~";"^$GetLine$";False)$ Loop
      ^!Replace "~~~" >> " " SBT
      ^!Goto Loop


      H=StartLineCheck
      ^!TimerPlay DoCheckLine
      ^!TimerStart 2000
      ^!Set %lines%=^?{Enter # of Lines per Page}
      ^!Set %incnum%=0

      H=StopLineCheck
      ^!TimerStop

      H=InsertPageBreak
      ^!KeyBoard Alt+D B

      H=DoCheckLine
      ^!Set %page%=^$Calc((^$GetRow$/^%lines%)-.01;2)$
      ^!Set %pagenum%=^$Calc(1+trunc(^%page%))$
      ; check line below for word wrap
      ^!Set %lastline%=^$Calc((^$GetRow$-1)/(^%lines%*(^%pagenum%-1));2)$
      ; end check word wrap
      ^!If ^%lastline% <> 1.00 Skip
      ^!Sound SystemExclamation
      ^!Set %pagenum%=^$Calc(^%incnum%+trunc(^%page%))$
      ^!StatusShow [ LINE ^$GetRow$ ] [ PAGE ^%pagenum% ]
      ^!Delay 50
      ^!If ^$GetRow$ < ^$GetLineCount$ End
      ^!TimerStop


      Sp├Ąter,
      Jody Adair

      I can only please one person a day.
      Today is obviously not your day.
      Tomorrow does not look good either. :-)
      http://www.sureword.com/sojourner/

      ------------------------------------------------------------------------
      eGroup home: http://www.eGroups.com/list/ntb-clips
      Free Web-based e-mail groups by eGroups.com
    Your message has been successfully submitted and would be delivered to recipients shortly.