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

[NTB] Re: Help on Clips

Expand Messages
  • Nicole Simon
    ... You don t need to have everything in one line just because your result must have this. Your clips will be much more readable (und debugable). How about
    Message 1 of 4 , Jan 31, 1999
    • 0 Attachment
      Anwar Ahmad wrote:
      > In this clip I want to replace every instance of space with + sign in the
      >Artist/Song name field e.g. "xxx yyy" should become xxx+yyy.

      You don't need to have 'everything in one line' just
      because your result must have this. Your clips will
      be much more readable (und debugable).

      How about [not really tested but qad]
      ---------- clb start -----------
      H="mp3 Search"
      ^!Set %artistsong%=^?[Enter Artist/Song Name]
      ^!Set %filetype%=^?[Select File Type=_mp3 - MPEG Layer 3^=mp3|mp2 - MPEG
      Layer 2^=mp2|mpg/mpeg - MPEG Movies^=mpg mpeg|qt/mov - Quicktime^=qt
      mov|avi^=avi|viv/vivo^=viv vivo|au Sun Audio^=au|mid/midi^=mid
      midi|wav^=wav|voc^=voc|vqf - Yamaha^=vqf|rm/ram - Real Media^=rm
      ram|asf/asx - Netshow^=asf asx|ra - Real Audio^=ra|la1/lav - Liquid
      Audio^=la1 lav|vdo^=vdo|swf - Shockwave^=swf|mod - Soundtracker^=mod|s3m -
      Screamtracker^=s3m|xm - Fasttracker^=xm|it^=it|All audio files^=audio|All
      Video files^=video|All trackerfiles^=track]

      ^!Set %artistsong%=^$StrReplace(" ";"+";^%artistsong%;No;No)$
      ^!URL
      http://search.mp3.de/cgi-bin/search.cgi?file=^%artistsong%&^%filetype%&noratio=yes

      ---------- clb end -----------

      btw there are spaces in the filetype.

      > Everything seems to work except Color prompt does not form part of main clip but
      > is shown after values for align, size, width and shade have been selected.

      easy (always look for 'what is different')

      > ^!Set %shade%=^?[3D Shading=_NOSHADE^= NOSHADE|SHADE^=]
      > ^!Set %colour%=^?{Color=^$GetClipText("Color Codes")$}
      ^ ^

      ^?[] are executed alltogether
      ^?{} only when the clip comes to this point.

      think about your above clip, you could ask for the filetype of beeing audio
      or video. depending on what you choose (audio or video) a smaler list ist
      displayed. this will only work, if the prompt is executet _after_ the first
      initial ^?[] prompting.

      btw: most of you set <HR^%align%^%size%^%width%^%shade%^%colour%>
      there are several versions of html-tags which have defaults. and most of
      the time i don't want an align etc. in your case, no size and no width etc
      is chossen, you need to care about - otherwise you result in something like
      "size=". (this clb does in part)

      Nicole

      --
      Dust Puppy: »Well. It is a long story ...
      but every saga has a beginning.«
      Greg: »You waited for days to use that line, didn't you.«
      User friendly (www.userfriendly.org) - 1998-11-27

      ------------------------------------------------------------------------
      eGroup home: http://www.eGroups.com/list/notetab
      Free Web-based e-mail groups by eGroups.com
    • Anwar Ahmad
      Nicole Thanks for the help. ... You are right. I am trying understand the clip language. ... That was a test clip. The mp3 search accepts spaces in file type.
      Message 2 of 4 , Feb 2, 1999
      • 0 Attachment
        Nicole

        Thanks for the help.

        Nicole Simon wrote:

        > You don't need to have 'everything in one line' just because your result must have
        > this. Your clips will be much more readable (und debugable).

        You are right. I am trying understand the clip language.

        > btw there are spaces in the filetype.

        That was a test clip. The mp3 search accepts spaces in file type.

        > ^?[] are executed alltogether
        > ^?{} only when the clip comes to this point.
        >
        > think about your above clip, you could ask for the filetype of beeing audio
        > or video. depending on what you choose (audio or video) a smaler list ist
        > displayed. this will only work, if the prompt is executet _after_ the first
        > initial ^?[] prompting.

        Got it now. I was studying html.clb and was wondering why all the tags using COLOR attribute listed all the colors again and again whereas there is a clip called "Color Codes" which could be called and used like a routine. This clip is only used by BODY clip. By calling this clip in my test I was trying to reduce the overall size of library.

        > btw: most of you set <HR^%align%^%size%^%width%^%shade%^%colour%>
        > there are several versions of html-tags which have defaults. and most of
        > the time i don't want an align etc. in your case, no size and no width etc
        > is chossen, you need to care about - otherwise you result in something like
        > "size=". (this clb does in part)

        Thanks. In the clip if I just click OK I get only <HR>. Every other value, if selected, would be inserted at its place. Anyway thanks for all the help. The Color selection part worked after I changed all ^?[] with ^?{}.

        Anwar



        ------------------------------------------------------------------------
        eGroup home: http://www.eGroups.com/list/notetab
        Free Web-based e-mail groups by eGroups.com
      • Nicole Simon
        ... The search engine - yes. But you are writing the url by yourself - and this is the case where you have to do the things which are normally done by the
        Message 3 of 4 , Feb 2, 1999
        • 0 Attachment
          >> btw there are spaces in the filetype.
          >
          >That was a test clip. The mp3 search accepts spaces in file type.
          >

          The search engine - yes. But you are writing the url by yourself - and this
          is the case where you have to do the things which are normally done by the
          browser.

          I asume your spaces will be translated in the url to %20

          Do a search for an artist an a filetype with spaces at the website. Copy
          the given url on the resultpage and try to make your result look the same
          (tip: remove the ^! in front of the url.

          If I say artist 2222 and rm+ram, my clip results in
          URL http://search.mp3.de/cgi-bin/search.cgi?file=2222&rm ram&noratio=yes

          look, how much is marked as an url. right, only til rm. If you replace
          space by %20 it will all be marked as url.

          Nicole

          --
          Dust Puppy: »Well. It is a long story ...
          but every saga has a beginning.«
          Greg: »You waited for days to use that line, didn't you.«
          User friendly (www.userfriendly.org) - 1998-11-27

          ------------------------------------------------------------------------
          eGroup home: http://www.eGroups.com/list/notetab
          Free Web-based e-mail groups by eGroups.com
        Your message has been successfully submitted and would be delivered to recipients shortly.