2 Replies Latest reply on Feb 4, 2011 8:12 AM by Jhon Carlo

    How to detect the number of marker (cuepoitName) with same name from a list.

    Jhon Carlo Level 1

      ... it is the second step of my previous question.

       

      From a sound I take a list of cuepointName with different name, for exemple:
      Mylistcuepoint =  ["reg 01", "reg 2", "name 1, "name 2", "name  3"] etc.
      Which command I must use to detect the cuePointTime only for the cuepointName: "name 1", "name 2" "name 3" ...
      My second question, for a second script is: how can I count how many  cuePointName with "name 1", "name 2", "name ...." I have in "Mylistcuepoint"?

       

      I can load several sound member so "Mylistcuepoint" can change obviously for the number of marker of "reg ...." and for the number of marker of "name ...." but the first word ("reg" or "name") it will be always the same.

       

      Tanks

        • 1. Re: How to detect the number of marker (cuepoitName) with same name from a list.
          Sean_Wilson Adobe Community Professional
          From a sound I take a list of cuepointName with different name, for exemple:

          Mylistcuepoint =  ["reg 01", "reg 2", "name 1, "name 2", "name  3"] etc.
          Which command I must use to detect the cuePointTime only for the cuepointName: "name 1", "name 2" "name 3" ...

          I already showed you how to do this in response to your last question.

           

          My second question, for a second script is: how can I count how many  cuePointName with "name 1", "name 2", "name ...." I have in "Mylistcuepoint"?

          It is a list like any other. Iterate through the items looking to see if they match your criterion/criteria and increment your found count (or add indices to a list) as you go:

          tSearch = "name 1"
          tFoundCount = 0
          
          Mylistcuepoint =  ["reg 01", "reg 2", "name 1, "name 2", "name  3"]
          if Mylistcuepoint.getPos(tSearch) then 
            repeat with nn = 1 to count(Mylistcuepoint)
              if ( Mylistcuepoint[nn] = tSearch ) then tFoundCount = tFoundCount +1
            end repeat
          end if
          
          1 person found this helpful
          • 2. Re: How to detect the number of marker (cuepoitName) with same name from a list.
            Jhon Carlo Level 1

            Hello,
            sorry Sean, it is only my fault, I have not explained well my problem.
            I try again and I hope to be more clear.
            I need to detect the second term of cuepoinName like a variable "name x" "name y"
            I need to enable the program to detect the change of the second value of "name ", because they change to many times and I can't write every time with the keyboard, but I need a command to do it automatically, also I don't know how many "cuePointName" I have, they change many time also by number.

            tSearch = "name ???"
            _____
            Mylistcuepoint =  ["reg ???", "reg ???", "name ???", "name ???" ..........]

            Many thanks Sean for your attention and your help.