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

Changing a variable field in some HTML code.

Expand Messages
  • skyflyerdezign
    Hello all ... I did some searching on the forum, but was not finding anything that matched my issue. Let me explain. I have some html code that is to display
    Message 1 of 7 , Jul 23, 2005
    • 0 Attachment
      Hello all ...
      I did some searching on the forum, but was not finding anything that
      matched my issue.
      Let me explain.
      I have some html code that is to display thumbnails and to display the
      picture when clicked. This code is generated by the Thumbs+ Wizard
      http://www.cerious.com/thumbnails.shtml.
      This wizard will create javascript code if selected, but we have no
      control of what code is created.
      The actual code created is ...
      <td valign="middle" align="center" width="20%"><a
      href="javascript:;" onClick="w =
      window.open('A1.jpg','TpWebWizImage','width=600,he
      ight=600,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
      w.resizeTo(647,677); w.focus()" style="cursor:hand">
      <img src="tn_A1_jpg.jpg" border="0" width="125" height="125"
      alt="A1.jpg"></a></td>

      I want to remove the 'w.resizeTo(647,677); ' portion of the many.
      Each one has different coordinates so it is hard to get a match.
      Could do it manually, but would prefer not.
      I am new to clipping. I have done a few simple find/replace.
      Is there any way to do what I want with NTP Clips?
      Perhaps some other method?
      Any thoughts would be appreciated.
      Thanks
      Bob
    • acummingsus
      ... [ text as next is in a doc ] ... ); ... width= 125 height= 125 ... Nah. It s easy using the match bracket feature. (that is, if your coordinates are
      Message 2 of 7 , Jul 23, 2005
      • 0 Attachment
        On Sun, 24 Jul 2005 00:36:21 -0000, skyflyerdezign wrote:
        > Hello all ...
        [ text as next is in a doc ]
        > The actual code created is ...
        >                 <td valign="middle" align="center" width="20%"><a
        > href="javascript:;" onClick="w =
        > window.open('A1.jpg','TpWebWizImage','width=600,he
        > ight=600,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no'
        );
        > w.resizeTo(647,677); w.focus()" style="cursor:hand">
        >                         <img src="tn_A1_jpg.jpg" border="0"
        width="125" height="125"
        > alt="A1.jpg"></a></td>
        >
        > I want to remove the 'w.resizeTo(647,677); ' portion of the many.
        > Each one has different coordinates so it is hard to get a match.

        Nah. It's easy using the match bracket feature. (that is, if your
        coordinates are held within the parenthesis)

        > Is there any way to do what I want with NTP Clips?

        H="wresizeTo"
        ^!Jump DOC_START
        ; ^!SetScreenUpdate OFF <- can go here once revved up
        :do_while
        ^!Find "w.resizeTo" IS
        ^!IfError end
        ; once revved up can remove next one line
        ^!Delay 15
        ^!Replace "^$GetSelection$" >> "" ISH
        ^!Find "(" IS
        ^!Toolbar "match bracket"
        ^!Select +1
        ; once revved up can remove next two lines
        ^!Skip continue?
        ^!Goto status
        ^!Replace "^$GetSelection$" >> "" ISH
        ^!Goto do_while
        ; optional once revved up can remove next two lines
        :status
        ^!Info undo button on toolbar recovers deletions
        ; ---end---

        "not revved up" simply means the clip is now in a "display" mode of
        sorts. (selections are to be seen briefly on screen is what I mean
        here).

        The clip works fine here. Experiment with it on a copy of your work.

        revved up means its confirmed that we're ready to do production now.
        --

        help > help on clip programming > click the index tab

        Have fun. Alan.
      • hsavage
        ... Bob, If your primary objective is to delete occurrences of w.resizeTo(647,677); and the space following regardless of the numerical values the following
        Message 3 of 7 , Jul 23, 2005
        • 0 Attachment
          skyflyerdezign wrote:
          > Hello all ...
          > I did some searching on the forum, but was not finding anything that
          > matched my issue.
          > Let me explain.
          >
          > The actual code created is ...
          > <td valign="middle" align="center" width="20%"><a
          > href="javascript:;" onClick="w =
          > window.open('A1.jpg','TpWebWizImage','width=600,he
          > ight=600,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
          > w.resizeTo(647,677); w.focus()" style="cursor:hand">
          > <img src="tn_A1_jpg.jpg" border="0" width="125" height="125"
          > alt="A1.jpg"></a></td>
          >
          > I want to remove the 'w.resizeTo(647,677); ' portion of the many.
          > Each one has different coordinates so it is hard to get a match.
          > Could do it manually, but would prefer not.
          > I am new to clipping. I have done a few simple find/replace.
          > Is there any way to do what I want with NTP Clips?
          > Perhaps some other method?
          > Any thoughts would be appreciated.
          > Thanks
          > Bob

          Bob,

          If your primary objective is to delete occurrences of
          'w.resizeTo(647,677); ' and the space following regardless of the
          numerical values the following regex 1 line clip should serve the purpose.

          H="X-resizeTo"
          ^!Replace "w\.resizeTo\(\d+\,\d+\)\;\s" >> "" TIWRSA

          ºvº
          05.07.24
          hrs > hsavage@...
        • Bob Serack
          That is exactly what I want to do, just remove it. And I it works. Thank you Thank you ... I played with so many variations last night and couldn t get it
          Message 4 of 7 , Jul 24, 2005
          • 0 Attachment
            That is exactly what I want to do, just remove it.
            And I it works. Thank you Thank you ...
            I played with so many variations last night and couldn't get it work.

            This is what you suggested.
            Most of it I understand. Might you explain the rest?
            H="X-resizeTo"
            ^!Replace "w\.resizeTo\(\d+\,\d+\)\;\s" >> "" TIWRSA
            What is the H= statement for? I don't see H referenced in the REPLACE
            statement.
            I understand the \ before the period before resize.
            I understand the \(\d+\,\d+\).
            I understand the \s.
            Why the \ before the semi-colon?
            Are you just stating that the the semi-colon will be a semi-colon in the
            search?
            Anyway, I learned a lot about find/replace this weekend.
            This Clip stuff can get pretty deep real fast!
            Thanks again ...

            Later ...
            Nuffsaid ...
            Bob





            hsavage wrote:

            > skyflyerdezign wrote:
            > > Hello all ...
            > > I did some searching on the forum, but was not finding anything that
            > > matched my issue.
            > > Let me explain.
            > >
            > > The actual code created is ...
            > > <td valign="middle" align="center" width="20%"><a
            > > href="javascript:;" onClick="w =
            > > window.open('A1.jpg','TpWebWizImage','width=600,he
            > > ight=600,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
            > > w.resizeTo(647,677); w.focus()" style="cursor:hand">
            > > <img src="tn_A1_jpg.jpg" border="0" width="125" height="125"
            > > alt="A1.jpg"></a></td>
            > >
            > > I want to remove the 'w.resizeTo(647,677); ' portion of the many.
            > > Each one has different coordinates so it is hard to get a match.
            > > Could do it manually, but would prefer not.
            > > I am new to clipping. I have done a few simple find/replace.
            > > Is there any way to do what I want with NTP Clips?
            > > Perhaps some other method?
            > > Any thoughts would be appreciated.
            > > Thanks
            > > Bob
            >
            > Bob,
            >
            > If your primary objective is to delete occurrences of
            > 'w.resizeTo(647,677); ' and the space following regardless of the
            > numerical values the following regex 1 line clip should serve the purpose.
            >
            > H="X-resizeTo"
            > ^!Replace "w\.resizeTo\(\d+\,\d+\)\;\s" >> "" TIWRSA
            >
            > ºvº
            > 05.07.24
            > hrs > hsavage@...
            >
            >
            >
            >
            >
            > Fookes Software: http://www.fookes.us, http://www.fookes.com
            > Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
            >
            >
            >
            > ------------------------------------------------------------------------
            > YAHOO! GROUPS LINKS
            >
            > * Visit your group "ntb-clips
            > <http://groups.yahoo.com/group/ntb-clips>" on the web.
            >
            > * To unsubscribe from this group, send an email to:
            > ntb-clips-unsubscribe@yahoogroups.com
            > <mailto:ntb-clips-unsubscribe@yahoogroups.com?subject=Unsubscribe>
            >
            > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
            > Service <http://docs.yahoo.com/info/terms/>.
            >
            >
            > ------------------------------------------------------------------------
            >
          • hsavage
            ... Bob, This is a one line clip, the clip title line is, H= X-resizeTo . I suppose the H= indicates the clip H eader, or name of clip and an H= name? is
            Message 5 of 7 , Jul 24, 2005
            • 0 Attachment
              Bob Serack wrote:
              > That is exactly what I want to do, just remove it.
              > And I it works. Thank you Thank you ...
              > I played with so many variations last night and couldn't get it work.
              >
              > This is what you suggested.
              > Most of it I understand. Might you explain the rest?
              > H="X-resizeTo"
              > ^!Replace "w\.resizeTo\(\d+\,\d+\)\;\s" >> "" TIWRSA
              > What is the H= statement for? I don't see H referenced in the REPLACE
              > statement.
              > I understand the \ before the period before resize.
              > I understand the \(\d+\,\d+\).
              > I understand the \s.
              > Why the \ before the semi-colon?
              > Are you just stating that the the semi-colon will be a semi-colon in the
              > search?
              > Anyway, I learned a lot about find/replace this weekend.
              > This Clip stuff can get pretty deep real fast!
              > Thanks again ...
              >
              > Later ...
              > Nuffsaid ...
              > Bob
              >>

              Bob,

              This is a one line clip, the clip title line is, H="X-resizeTo". I
              suppose the H= indicates the clip 'H'eader, or name of clip and an
              H="name?" is required for each clip.

              Apparently you added it to a clipbook correctly if you've discovered it
              works.

              > Why the \ before the semi-colon?
              > Are you just stating that the the semi-colon will be a semi-colon in the
              > search?

              In a word, YES, the answer to your question about '\;', I didn't have my
              cheat sheet, below, available when writing the regexp so to be safe I
              delimited the semi-colon. The comma and the right paren. needn't be
              delimited either.

              H="X-resizeTo"
              ^!Replace "w\.resizeTo\(\d+\,\d+\)\;\s" >> "" TIWRSA

              Since sending the email I've restructured the pattern slightly as follows:

              ^!Replace "w\.resizeTo\(\d+,\d+);\s" >> "" TIWRSA

              These are the characters that need to be escaped if you desire to use
              them literally within a regular expression.

              ^ $ . * + ? | / \ { [ (

              P.S. When you reply directly to a message it comes back to the list,
              theory being, keeps all listers in the loop and allows input from more
              sources.

              ºvº
              05.07.24
              hrs > hsavage@...
            • Bob Serack
              Got it about the ntp-clip loop. And thanks for the info. Have a good week ... Nuffsaid ... Bob
              Message 6 of 7 , Jul 24, 2005
              • 0 Attachment
                Got it about the ntp-clip loop.
                And thanks for the info.
                Have a good week ...

                Nuffsaid ...
                Bob


                hsavage wrote:

                > Bob Serack wrote:
                > > That is exactly what I want to do, just remove it.
                > > And I it works. Thank you Thank you ...
                > > I played with so many variations last night and couldn't get it work.
                > >
                > > This is what you suggested.
                > > Most of it I understand. Might you explain the rest?
                > > H="X-resizeTo"
                > > ^!Replace "w\.resizeTo\(\d+\,\d+\)\;\s" >> "" TIWRSA
                > > What is the H= statement for? I don't see H referenced in the REPLACE
                > > statement.
                > > I understand the \ before the period before resize.
                > > I understand the \(\d+\,\d+\).
                > > I understand the \s.
                > > Why the \ before the semi-colon?
                > > Are you just stating that the the semi-colon will be a semi-colon in the
                > > search?
                > > Anyway, I learned a lot about find/replace this weekend.
                > > This Clip stuff can get pretty deep real fast!
                > > Thanks again ...
                > >
                > > Later ...
                > > Nuffsaid ...
                > > Bob
                > >>
                >
                > Bob,
                >
                > This is a one line clip, the clip title line is, H="X-resizeTo". I
                > suppose the H= indicates the clip 'H'eader, or name of clip and an
                > H="name?" is required for each clip.
                >
                > Apparently you added it to a clipbook correctly if you've discovered it
                > works.
                >
                > > Why the \ before the semi-colon?
                > > Are you just stating that the the semi-colon will be a semi-colon in the
                > > search?
                >
                > In a word, YES, the answer to your question about '\;', I didn't have my
                > cheat sheet, below, available when writing the regexp so to be safe I
                > delimited the semi-colon. The comma and the right paren. needn't be
                > delimited either.
                >
                > H="X-resizeTo"
                > ^!Replace "w\.resizeTo\(\d+\,\d+\)\;\s" >> "" TIWRSA
                >
                > Since sending the email I've restructured the pattern slightly as follows:
                >
                > ^!Replace "w\.resizeTo\(\d+,\d+);\s" >> "" TIWRSA
                >
                > These are the characters that need to be escaped if you desire to use
                > them literally within a regular expression.
                >
                > ^ $ . * + ? | / \ { [ (
                >
                > P.S. When you reply directly to a message it comes back to the list,
                > theory being, keeps all listers in the loop and allows input from more
                > sources.
                >
                > ºvº
                > 05.07.24
                > hrs > hsavage@...
                >
                >
                >
                >
                >
                > Fookes Software: http://www.fookes.us, http://www.fookes.com
                > Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
                >
                >
                >
                >
                > SPONSORED LINKS
                > Anti virus software program
                > <http://groups.yahoo.com/gads?t=ms&k=Anti+virus+software+program&w1=Anti+virus+software+program&w2=Medical+software+program&w3=Accounting+software+program&w4=Affiliate+program+software&w5=Software+virus+program&c=5&s=156&.sig=jQSL6jZlPB-YLL9rLKzAbQ>
                > Medical software program
                > <http://groups.yahoo.com/gads?t=ms&k=Medical+software+program&w1=Anti+virus+software+program&w2=Medical+software+program&w3=Accounting+software+program&w4=Affiliate+program+software&w5=Software+virus+program&c=5&s=156&.sig=0EBNVbOnSmCpIrAfa7tTrg>
                > Accounting software program
                > <http://groups.yahoo.com/gads?t=ms&k=Accounting+software+program&w1=Anti+virus+software+program&w2=Medical+software+program&w3=Accounting+software+program&w4=Affiliate+program+software&w5=Software+virus+program&c=5&s=156&.sig=uMdzPXX74MbBz_7oPYwClA>
                >
                > Affiliate program software
                > <http://groups.yahoo.com/gads?t=ms&k=Affiliate+program+software&w1=Anti+virus+software+program&w2=Medical+software+program&w3=Accounting+software+program&w4=Affiliate+program+software&w5=Software+virus+program&c=5&s=156&.sig=rDH1kpaLObJj5ep9Ud_KWQ>
                > Software virus program
                > <http://groups.yahoo.com/gads?t=ms&k=Software+virus+program&w1=Anti+virus+software+program&w2=Medical+software+program&w3=Accounting+software+program&w4=Affiliate+program+software&w5=Software+virus+program&c=5&s=156&.sig=6wXXcxRI3mFP37ttOPM0yQ>
                >
                >
                >
                > ------------------------------------------------------------------------
                > YAHOO! GROUPS LINKS
                >
                > * Visit your group "ntb-clips
                > <http://groups.yahoo.com/group/ntb-clips>" on the web.
                >
                > * To unsubscribe from this group, send an email to:
                > ntb-clips-unsubscribe@yahoogroups.com
                > <mailto:ntb-clips-unsubscribe@yahoogroups.com?subject=Unsubscribe>
                >
                > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
                > Service <http://docs.yahoo.com/info/terms/>.
                >
                >
                > ------------------------------------------------------------------------
                >
              • acummingsus
                Hi Bob, hrs, FWIW, rationale about what I forgot and circumstance that optionally or not call for the use of regex. ... Oh, that s great, hrs. It s good that
                Message 7 of 7 , Jul 24, 2005
                • 0 Attachment
                  Hi Bob, hrs,

                  FWIW, rationale about what I forgot and circumstance that optionally
                  or not call for the use of regex.

                  > That is exactly what I want to do, just remove it.
                  > And I it works. Thank you Thank you ...

                  > H="X-resizeTo"
                  > ^!Replace "w\.resizeTo\(\d+\,\d+\)\;\s" >> "" TIWRSA

                  Oh, that's great, hrs. It's good that you regex without a wild
                  character.

                  I wrote it the other way like I did because I keep forgetting about
                  the specifics of the Ntab regex greed issue (greed on a per each line
                  basis).

                  I forget that a wild character must be involved in the regex or
                  otherwise there is no greed issue.

                  There at times can be reasons to write it the other way like I did.
                  But likely not this time unless it's an older OS with exceptionally
                  huge file(s) to run the clip on.

                  Some illustrations of a greedy regex (with wild char) follows to
                  hopefully help me remember.

                  .+ means anything, any character repeated one or more times.

                  In the above, the .+ the dot/period is a wild card/char so to speak.

                  Next is a greedy regex followed by what it will capture.

                  ^!Replace "w\.resizeTo\(\d+\,.+\)\;\s" >> "" TIWRSA

                  Stuff w.resizeTo(647,677); the text more chars w.resizeTo(647,677);

                  ->w.resizeTo(647,677); the text more chars w.resizeTo(647,677);<-

                  snags from -> to <- as one of its picks to be replaced with nothing.

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