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

Re: ^$IsHTMLDoc$ UpdateIndex

Expand Messages
  • Eb
    If the enclosed code is the whole clip, you re missing the label UpdateIndex . So the subject jump cannot complete. Cheers, Eb
    Message 1 of 3 , Jul 2 8:30 PM
    • 0 Attachment
      If the enclosed code is the whole clip, you're missing the label "UpdateIndex". So the subject jump cannot complete.


      Cheers,

      Eb

      --- In ntb-clips@yahoogroups.com, "Jeffery" <jeff@...> wrote:
      >
      > This check is not working in NoteTab standard, it says it can't do the update of the stored index. Is there a NEWER clipcode?
      >
      > This is in the Tidy All Open Documents clip:
      >
      > ;Tidy code in all open HTML documents. This Clip can use the HTML Tidy program, if available
      > ^!Continue This Clip will tidy the code in all open HTML documents. Continue?
      >
      > ;Copy the document count in a variable
      > ^!Set %Index%=^$GetDocCount$
      >
      > ;Determine method to use
      > ^!Set %UseHtmlTidy%=No
      > ^!IfFileExist "^$GetTidyExe$"
      > ^!Set %UseHtmlTidy%=Yes
      > ^!IfFalse ^%UseHtmlTidy% InitPlain
      > ;If HTML Tidy is found, ask which method the user would like to use
      > ^!Set %UseHtmlTidy%=^?{Select method==_Use HTML Tidy program (more options)^=Yes|Use NoteTab commands (much faster)^=No}
      > ^!IfTrue ^%UseHtmlTidy% InitTidy
      >
      > :InitPlain
      > ^!Set %Param%=^?{Tag format?==Uppercase|_Lowercase|XHTML}; %SaveChanges%=^?{Automatically save changed documents?==Yes|_No}; %Label%=CallPlain
      > ^!Goto LoopStart
      >
      > :InitTidy
      > ^!Set %Param%=--tidy-mark false -q^?{Indent HTML code?==_Yes^=i|No^=}^?{Tag format?==Uppercase^=u|_Lowercase^=|XHTML^= -asxml}^?{Wrap long lines?==_Yes^=|No^= -wrap 0}; %SaveChanges%=^?{Automatically save changed documents?==Yes|_No}; %Label%=CallTidy
      >
      > ;Check every open document through the following loop
      > :LoopStart
      > ;Activate the specified document (starts with the last one in the tab bar)
      > ^!SetWordWrap OFF
      > ^!SetScreenUpdate OFF
      > ^!SetDocIndex ^%Index%
      > ;Skip the conversion process if the document does not have an HTML extension or is a Clipbook library
      > ^!IfFalse ^$IsHTMLDoc$ UpdateIndex
      > ^!IfTrue ^$IsClipDoc$ UpdateIndex
      > ^!Goto ^%Label%
      >
      > ;Tidy the contents of the current document
      > :CallPlain
      > ^!Select ALL
      > ^!InsertText ^$GetHtmlTextTidy("^$GetSelection$";^%Param%)$
      > ^!Goto EndCall
      >
      > :CallTidy
      > ^!RunTidy ^%Param%
      > ^!IfError UpdateIndex
      >
      > :EndCall
      > ;Place the cursor at the start of the document
      > ^!Jump Text_Start
      > ;Save converted document if users wants this done automatically
      > ^!IfFalse ^%SaveChanges% UpdateIndex
      > ^!IfFalse ^$IsModified$ UpdateIndex
      > ^!Save
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.