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

Re: Can a clip run the last run clip on all open docs?

Expand Messages
  • abairheart
    ... There are a number of approaches to do this. 1. Save the clipname in the INI file, have the second clip run the clip stored that way: In every clip you
    Message 1 of 6 , Jun 18 3:55 PM
      --- In ntb-clips@yahoogroups.com, Jeff Scism <Scismgenie@...> wrote:
      >
      > I have a clip I use to decapitate webpages, (remove the head), but can
      > not figure out how to make it run on all open docs in NoteTab STD 5.1.
      >
      > Decapitate HTML
      >
      > ^!Find </head> TIWS
      > ^!Jump SELECT_END
      > ^!SelectTo 1:1
      > ^!Menu EDIT/CUT
      >
      > What I thought would be handy would be a clip that selects the last run
      > clip, and runs it on all open docs.



      There are a number of approaches to do this.

      1. Save the clipname in the INI file,
      have the second clip run the clip stored that way:

      In every clip you consider for this treatment, add the line:
      ^!SaveValue LastRun:Clipname=^$GetClipName$

      In the clip that you want to have the last-run clip operate on all docs:

      ^!Set %clipname%=^$GetValue(LastRun:Clipname)$
      ^!Set %docs%=^$GetDocCount$
      :LOOP
      ^!SetDocindex ^%docs%
      ^!Clip "^%clipname%"
      ^!Dec %docs%
      ^!If ^%docs%>0 LOOP

      2. a second way is of course, to simply wrap the loop above around the
      code you want to run on all docs:

      ^!Set %docs%=^$GetDocCount$
      :LOOP
      ^!SetDocindex ^%docs%
      ;
      ;place your action code here
      ;
      ^!Dec %docs%
      ^!If ^%docs%>0 LOOP



      Abair
    Your message has been successfully submitted and would be delivered to recipients shortly.