0 Members and 1 Guest are viewing this topic.
FindObject('acPlayerRepeat').execute; //переключить Repeat
FindObject('acPlayerShuffle').execute; //переключить Shuffle
Правильно ли я набираю строки в скрипте?:Code: [Select]FindObject('acPlayerRepeat').execute; //переключить RepeatиCode: [Select]FindObject('acPlayerShuffle').execute; //переключить Shuffle...потому как состояния этих переключателей таким образом не переключаются.
...И вообще окном отладчика пользоваться не научился. Он у меня всегда пуст.
case FindObject('NewLogicalOperatorCommutator').Get('Result') of 0: ... ...
NewScriptableOperatorCounter: Property Result does not exist
procedure Execute(var State: Integer);var Rp : TComponent; Sf : TComponent; Ct : TComponent;begin Rp:= FindObject('acPlayerRepeat'); Sf:= FindObject('acPlayerShuffle'); Ct:= FindObject('ShuffpeatCounter'); case Ct.Get('Position') of 0: begin Rp.Execute end; 1: begin Rp.Execute; Sf.Execute end; 2: begin Sf.Execute end; 3: begin Rp.Execute end; end;end;
Тут ещё может быть неприятный момент - рассинхронизация счётчика, поскольку провайдеры при каждом проходе скрипта просто инвертируют своё состояние, а не привязаны жёстко к позиции счётчика. Если пользователь в главном окне включит обычной кнопкой Repeat или Shuffle - то потом в трее алгоритм нарушится.
If(Value1=0 AND Value2=0,0,If(Value1=0 AND Value2=1,1,If(Value1=1 AND Value2=0,2,3)))
В параметрах:Code: [Select]If(Value1=0 AND Value2=0,0,If(Value1=0 AND Value2=1,1,If(Value1=1 AND Value2=0,2,3)))
procedure Execute(var State: Integer);var Rp : TComponent; Sf : TComponent; Ct : TComponent;begin Rp:= FindObject('acPlayerRepeat'); Sf:= FindObject('acPlayerShuffle'); Ct:= FindObject('ShuffpeatCounter'); If State Then case Ct.Get('Position') of 0: begin Rp.Execute end; 1: begin Rp.Execute; Sf.Execute end; 2: begin Sf.Execute end; 3: begin Rp.Execute end; end; State:=0end;