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

^$IsHTMLDoc$ UpdateIndex

Expand Messages
  • Jeffery
    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
    Message 1 of 3 , Jun 25, 2012
    • 0 Attachment
      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
    • Jeffery Scism
      When I run the clip it tidys the last open doc then chokes. Jeff ... [Non-text portions of this message have been removed]
      Message 2 of 3 , Jun 25, 2012
      • 0 Attachment
        When I run the clip it "tidys" the last open doc then chokes.

        Jeff

        On 6/25/2012 7:24 AM, Jeffery 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
        >



        [Non-text portions of this message have been removed]
      • Eb
        If the enclosed code is the whole clip, you re missing the label UpdateIndex . So the subject jump cannot complete. Cheers, Eb
        Message 3 of 3 , Jul 2, 2012
        • 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.