I can't make the "or" logical operator to work. For example if I want to use "do ... until" and for the until I want to set two possibilities : a specific number or "none"
If I try to find the clip position of my current clip for exemple :
Code: Select all
tv_clipcurrentid
ClipID = result
ClipPos = 0
DO
tv_ClipEnumID -1 ClipPos
Parse Result PosID
i = i+1
UNTIL (CMP(PosID,ClipID)==1 || CMP(PosID,"None") == 1)
Nathan
EDIT : OK found the solution the logical operators works well, the problem was in the syntax of the script himself.
+ the tv_ClipCurrentID never returns none cause we can't have no clip selected, don't know why I was thinking that. So no need for the "or" opérator. Final script :
Code: Select all
#Function Otano_ClipCurrentPos()
LOCAL ClipID ClipPos PosID
tv_clipcurrentid
ClipID = result
ClipPos = 0
tv_ClipEnumID -1 ClipPose
PosID = result
While (CMP(PosID, ClipID)==0)
ClipPos = ClipPos+1
tv_ClipEnumID -1 ClipPos
PosID = result
END
result = ClipPos
#End