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

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

Expand Messages
  • Doug Offen
    Jun 1 8:11 PM
      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
      ;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
    • Show all 6 messages in this topic