AIMP Forum
AIMP for PC => Skin Editor, Skin Engine => Вопросы / Questions => Topic started by: koelo on February 21, 2022, 18:12:05
-
How to make a button which when pressed copies a custom text into clipboard?
-
Какой текст?
-
Какой текст?
Just some text regarding my skin. For example lets just make it "abc".
-
Only TASETextDisplay and TASETextDisplayEx has the CopyToClipboard method that copies the text display's content.
Refer to CopyToClipboardHandler custom provider in the Charm skin
-
Is there any progress on this? i wrote a script to test it, but it’s not working. here’s the script i wrote:
procedure Execute(Sender, Arguments: TComponent);
var
S: string;
InfoTextObj: TComponent;
begin
InfoTextObj := FindObject('FInfoText');
if InfoTextObj <> nil then
begin
try
S := InfoTextObj.Get('DisplayValue');
except
S := '';
end;
if Arguments <> nil then
begin
Arguments.Set('DisplayValue', S);
Arguments.CopyToClipboard;
ShowMessage('Info Copied: ' + S);
end
else
begin
ShowMessage('Arguments empty: ' + S);
end;
end
else
ShowMessage('FInfoText not found.');
end;
-
What exactly does not work here?
-
There is an FInfoText component, but its displayValue cannot be copied; it constantly returns 'Arguments empty'
-
FInfoText
What class of this component? What component invokes the script?
-
no worries, i figured it out thanks