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

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

Expand Messages
  • Jeff Scism
    I am using this to eliminate existing heads and then pasting a standard configuration in place. So it works ok with ^!Close Save. My ultimate plan is to have
    Message 1 of 6 , Jun 10, 2007
      I am using this to "eliminate" existing heads and then pasting a
      standard configuration in place. So it works ok with ^!Close Save.

      My ultimate plan is to have the heads controlled by CSS, if I ever
      figure that out, however I am finally making progress in learning how to
      clip program.

      Thanks again for your help.

      Jeff

      hsavage wrote:
      >
      > ---
      > H="Decapitate Html"
      > ; • Modified-Updated~Created_20070610
      > ; • hrs ø hsavage·pobox·com_10:31:58a
      > ^!ClearVariables
      > ;^!SetWizardTitle "DECAPITATE HTM? FILES"
      > ^!SetWizardLabel "Select Folder And Choose Whether To Do SubFolders"
      > ^!SetScreenUpdate 0
      > ; edit next 'long' line to reflect your 'C:\starting_folder\sub_folder\'
      > ;
      > ^!Set %path%=^?{(T=D)Select Folder To Work On=C:\+r2rweb\lists\};
      > %subs%=^?{Edit Files In Path/SubFolders Also==YES^=+|_NO^=^%empty%}
      > ;
      > ^!Set %file%=^$GetFileFirst("^%subs%^%path%";*.*htm*;;unsorted)$
      > ^!If '^%file%' = '^%EMPTY%' END
      > :LOOP
      > ; various file actions may be placed between dashed lines
      > ; delay may need increasing or may not be needed at all.
      > ^!Open ^%file%
      > ^!Delay 1
      > ;------------------------
      > :DECAPITATE
      > ^!Find </head> IWS
      > ^!Jump SELECT_END
      > ^!SelectTo 1:1
      > ^!Menu EDIT/CUT
      > ; by manipulating the next 2 lines you can leave
      > ; files open or close each one as it's modified
      > ; or leave each one open, modified, and unsaved.
      > ;^!Save
      > ^!Close SAVE
      > ;------------------------
      > ^!Set %file%=^$GetFileNext$
      > ^!If ^%file% = ^%EMPTY% NEXT ELSE LOOP
      > ^!CloseFileFind
      > :END
      > ^!StatusShow No Files With The Sought-After Extensions!
      > ^!Delay 15
      > ---
      >
      > • Copy Clip To Clipboard, RightClick
      > • ClipBook At proposed location,
      > • Click "Add from Clipboard"
      >
      > Carefully watch for email wrapped lines
      >
      > ºvº SL-6-76 -created- 2007.06.10 - 10.24.10
      >
      > Newspaper HeadLine...
      > "4-H Girls Win Prizes for Fat Calves"
      > ¤ ø ¤ hrs ø hsavage@...
      >
      >
      >
      >
      >
      > Fookes Software: http://www.fookes.com/
      > Fookes Software Discussion Lists: http://www.fookes.com/groups.php
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
    • 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 2 of 6 , Jun 18, 2007
        --- 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.