AIMP Forum
AIMP for PC => Skin Editor, Skin Engine => Вопросы / Questions => Topic started by: Seque on December 20, 2023, 18:53:28
-
Hi, this is a sample code:
procedure Execute(Sender, Arguments: TComponent);
var
Object : TComponent;
i : Integer;
begin
i := Arguments.Get('State');
Object := FindObject('Animator');
Object.BeginUpdate;
Object.Set('Visible',i);
Object.EndUpdate;
end;
I need to obtain 'State' from pause button, this code is implement on OnClick event in pause button. When is paused an animation hide and when is playing the animation must be shown. In this code 'i' always is 0
Thanks in advance
-
I need to obtain 'State' from pause button
Sender.Get('State');
-
Sender.Get('State');
Thanks, but doesn't work... if i use Sender.Get('State'); throws "Error at 6:3 - Property does not exist."
-
Can you share a small example that illustrates the issue?
-
Can you share a small example that illustrates the issue?
I have a button named "btnPausa" and onClick event this script:
procedure Execute(Sender, Arguments: TComponent);
var
Object : TComponent;
i : Integer;
begin
i := Sender.Get('State');
Object := FindObject('Animator');
Object.BeginUpdate;
Object.Set('Visible',i);
Object.EndUpdate;
end;
-
... When is paused an animation hide and when is playing the animation must be shown.
(https://www.aimp.ru/forum/index.php?action=dlattach;topic=72039.0;attach=70091)
-
Sorry, my fault. Try this approach:
procedure Execute(Sender, Arguments: TComponent);
var
Bindings: TASEBindings;
begin
Bindings := Sender.Get('Bindings');
OutputDebugString(Bindings.GetDataAsInteger('State'))
end;