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

EMBED to OBJECT and EMBED

Expand Messages
  • Chris Valentine
    I ve managed to create a clip that can search for tags in an HTML file, copy the parameters, then replace it with an with inside.
    Message 1 of 4 , Sep 9, 2005
    • 0 Attachment
      I've managed to create a clip that can search for <EMBED> tags in an
      HTML file, copy the parameters, then replace it with an <OBJECT> with
      <EMBED> inside.

      ^!Replace "<embed src=\"{[a-zA-Z0-9-_./^"]+}\" width=\"{[0-9]+}\"
      height=\"{[0-9]+}\" autoplay=\"{[a-zA-Z]+}\"
      controller=\"{[a-zA-Z]+}\" {[a-zA-Z0-9-=_\"^>]*}>" >> "\n<object
      classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
      codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="\2"
      height="\3">\n<param name="src" value="\1">\n<param name="autoplay"
      value="\4">\n<param name="controller" value="\5">\n<embed src="\1"
      width="\2" height="\3" autoplay="\4"
      controller="\5"></embed>\n</object>\n" RI

      What I'm wondering now is, what happens if the parameters to the
      original <EMBED> tag are in a different order? I know that as it
      stands, it won't actually find the existing tag, but is there a way to
      get it to ignore the order? In the situation I am using it, it doesn't
      matter since all the pages were created using GoLive 4 and the tags
      are all contructed in exactly the same way, but with other editors,
      and with hand-crafted HTML, the parameter order could be completely
      different.

      BTW I should say that the HTML here is not necessarily going to pass
      any kind of validation!

      Chris.
    • abairheart
      ... with ... to ... doesn t ... Short of trying to decipher such a long expression, what comes to mind immediately is, to search for the embed expression, and
      Message 2 of 4 , Sep 9, 2005
      • 0 Attachment
        --- In ntb-clips@yahoogroups.com, "Chris Valentine" <orders@h...>
        wrote:
        > I've managed to create a clip that can search for <EMBED> tags in an
        > HTML file, copy the parameters, then replace it with an <OBJECT>
        with
        > <EMBED> inside.
        >
        > ^!Replace "<embed src=\"{[a-zA-Z0-9-_./^"]+}\" width=\"{[0-9]+}\"
        > height=\"{[0-9]+}\" autoplay=\"{[a-zA-Z]+}\"
        > controller=\"{[a-zA-Z]+}\" {[a-zA-Z0-9-=_\"^>]*}>" >> "\n<object
        > classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
        > codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="\2"
        > height="\3">\n<param name="src" value="\1">\n<param name="autoplay"
        > value="\4">\n<param name="controller" value="\5">\n<embed src="\1"
        > width="\2" height="\3" autoplay="\4"
        > controller="\5"></embed>\n</object>\n" RI
        >
        > What I'm wondering now is, what happens if the parameters to the
        > original <EMBED> tag are in a different order? I know that as it
        > stands, it won't actually find the existing tag, but is there a way
        to
        > get it to ignore the order? In the situation I am using it, it
        doesn't
        > matter since all the pages were created using GoLive 4 and the tags
        > are all contructed in exactly the same way, but with other editors,
        > and with hand-crafted HTML, the parameter order could be completely
        > different.


        Short of trying to decipher such a long expression, what comes to
        mind immediately is, to search for the embed expression, and wrap it
        in the desired object.

        First try the HTML commands built into NoteTab, one of them, don't
        remember the name, will let you select an entire HTML tag, including
        the ending tag, and all in between.

        Since the entire tag is now selected, use an InsertHTML command to
        write "<objec ...>^$GetSelection$</object>" to the file,
        automatically replcaing the selection.

        Sorry, I do not know, if the above functions will work with <embed>
        tags or not.

        Abair
      • hsavage
        ... Chris, From the other responses there must be an easier, more efficient way to do this! Can you copy and paste an string before altering and also
        Message 3 of 4 , Sep 9, 2005
        • 0 Attachment
          Chris Valentine wrote:
          > I've managed to create a clip that can search for <EMBED> tags in an
          > HTML file, copy the parameters, then replace it with an <OBJECT> with
          > <EMBED> inside.
          >
          > ^!Replace "<embed src=\"{[a-zA-Z0-9-_./^"]+}\" width=\"{[0-9]+}\"
          > height=\"{[0-9]+}\" autoplay=\"{[a-zA-Z]+}\"
          >
          > What I'm wondering now is, what happens if the parameters to the
          > original <EMBED> tag are in a different order? I know that as it
          > stands, it won't actually find the existing tag, but is there a way to
          > get it to ignore the order?
          >
          > BTW I should say that the HTML here is not necessarily going to pass
          > any kind of validation!
          >
          > Chris.

          Chris,

          From the other responses there must be an easier, more efficient way to
          do this!

          Can you copy and paste an <embed> string before altering and also the
          same string after adding the object tags, the better to see what you're
          doing?

          ºvº
          05.09.09
          hrs > hsavage@...
        • Chris Valentine
          ... Whilst I haven t tried this yet, I think what I need to do is to do a series of searches to grab all the expected parameters one by one and stuff them into
          Message 4 of 4 , Sep 15, 2005
          • 0 Attachment
            --- In ntb-clips@yahoogroups.com, "Chris Valentine" <orders@h...> wrote:

            > What I'm wondering now is, what happens if the parameters to the
            > original <EMBED> tag are in a different order?

            Whilst I haven't tried this yet, I think what I need to do is to do a
            series of searches to grab all the expected parameters one by one and
            stuff them into variables, then construct the new tags from scratch,
            as it were.

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