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

Re: [Clip] Run a simple clip on a folder of files? How is best way?

Expand Messages
  • Doug Offen
    Hello Jody and everyone. I have messed around with the DirStuf and searched through the help and looked at clips that have some common commands and come up
    Message 1 of 6 , Jun 1, 2006
    View Source
    • 0 Attachment
      Hello Jody and everyone.

      I have messed around with the DirStuf and searched through the help
      and looked at clips that have some common commands and come up with a
      couple of useful to me clips that work.

      This one works through each opened text file to set up title
      capiatalization, paragraph breaks and tightens the spacing then saves
      each file again.

      ;Activates the first document in the tab bar
      ^!Document First

      ;Beginning of loop
      :Start
      ;Ask if user wants to continue Clip
      ;^!Continue Next document is now current. Continue?
      ;^!SetDebug ON
      ;selects first line and makes sure it is capitalized
      ^!Keyboard Ctrl+Home
      ^!Keyboard Shift+End
      ^!Keyboard Shift+Ctrl+k
      ;goes to home then down 1 line adds return then selects to end
      ^!Keyboard Ctrl+Home
      ^!Keyboard down
      ^!Keyboard Enter
      ^!Keyboard Ctrl+Shift+end
      ;^!continue Takes our hard returns and substitutes double hard returns
      at end of ;paragraphs for selected text.
      ;^!SetDebug ON
      ;^!Check that text selected
      ;repaces double space with single space
      ^!Replace " " >> " " HAS
      ^!Replace " " >> " " HAS
      ^!Replace " " >> " " HAS
      ^!Replace " " >> " " HAS
      ^!Replace " " >> " " HAS
      ^!Replace " " >> " " HAS
      ^!Replace " " >> " " HAS
      ^!Replace "-^T" >> " " HAS
      ^!Replace "^T" >> " " HAS
      ;replaces space hard return with hard return
      ^!Replace " ^P" >> "^P" HAS
      ;replaces punctuation and return with marker and return
      ^!Replace "-^P" >> "NPP-^P" HAS
      ^!Replace ""^P" >> "NPP"^P" HAS
      ^!Replace ".^P" >> "NPP.^P" HAS
      ^!Replace "!^P" >> "NPP!^P" HAS
      ^!Replace "?^P" >> "NPP?^P" HAS
      ;replaces double hard returns with single
      ^!Replace "^P^P" >> "^P" HAS
      ;replaces single hard returns with space
      ^!Replace "^P" >> " " HAS
      ;replaces NPP markers with punctuation and double hard returns
      ^!Replace "NPP" " >> ""^P^P" HAS
      ^!Replace "NPP. " >> ".^P^P" HAS
      ^!Replace "NPP! " >> "!^P^P" HAS
      ^!Replace "NPP? " >> "?^P^P" HAS
      ^!Replace "NWP?" >> "?^P^P" HAS
      ^!Replace "NPP-" >> "-^P^P" HAS
      ^!Replace "^T" >> " " HAS
      ;removes any indentation
      ^!Menu Edit/Select All
      ^!Menu Modify/Lines/unindent
      ^!Menu Modify/Lines/unindent
      ^!Menu Modify/Lines/unindent
      ;^!Keyboard "Shift+Ctrl+I"

      ;^!Replace "" >> "" HAS copy of replace code
      ;...save document to original name
      ^!Keyboard "Ctrl+s"
      ;Activate this line instead of above line if you want it to be saved
      as another file name.
      ;^!Keyboard "Shift_Ctrl+s"
      ^!Jump Doc_Start
      ;Activates the next document in the tab bar
      ^!Document Next
      ;End Clip if an error condition was generated (i.e. no more documents
      after the current one)
      ^!IfError End
      ;Jump back to the start of the loop
      ^!GoTo Start

      -----------------

      Thanks for your help. I still don't know why or how most of the
      file/folder commands work but messing with already working codes gets
      some results.

      Doug Offen
    • Don - HtmlFixIt.com
      this might be a better start: ;Activates the first document in the tab bar ^!Document First ;^!SetDebug On ;Beginning of loop ... ;selects first line and makes
      Message 2 of 6 , Jun 2, 2006
      View Source
      • 0 Attachment
        this might be a better start:
        ;Activates the first document in the tab bar
        ^!Document First
        ;^!SetDebug On

        ;Beginning of loop
        :Start
        ;selects first line and makes sure it is capitalized
        ^!Jump Doc_Start
        ^!Select Eol
        ^!Keyboard Shift+Ctrl+k
        ;goes to home then down 1 line adds return then selects to end
        ^!Jump Select_End
        ^!Keyboard Enter
        ^!Keyboard Ctrl+Shift+end

        I think you should avoid keyboard commands when there is an equivalent.
        Sometimes there is not of course.
      Your message has been successfully submitted and would be delivered to recipients shortly.