AIMP Forum

AIMP for PC => Skin Editor, Skin Engine => Вопросы / Questions => Topic started by: koelo on February 21, 2022, 18:12:05

Title: Button copy text to clipboard?
Post by: koelo on February 21, 2022, 18:12:05
How to make a button which when pressed copies a custom text into clipboard?
Title: Re: Button copy text to clipboard?
Post by: Soolo on February 21, 2022, 19:30:51
Какой текст?
Title: Re: Button copy text to clipboard?
Post by: koelo on February 21, 2022, 20:17:23
Какой текст?


Just some text regarding my skin. For example lets just make it "abc".
Title: Re: Button copy text to clipboard?
Post by: Artem on February 22, 2022, 20:49:31
Only TASETextDisplay and TASETextDisplayEx has the CopyToClipboard method that copies the text display's content.
Refer to CopyToClipboardHandler custom provider in the Charm skin
Title: Re: Button copy text to clipboard?
Post by: heroclix on March 27, 2026, 00:21:10
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;
Title: Re: Button copy text to clipboard?
Post by: Artem on March 27, 2026, 08:20:51
What exactly does not work here?
Title: Re: Button copy text to clipboard?
Post by: heroclix on March 27, 2026, 08:56:37
There is an FInfoText component, but its displayValue cannot be copied; it constantly returns 'Arguments empty'
Title: Re: Button copy text to clipboard?
Post by: Artem on March 27, 2026, 09:56:17
FInfoText

What class of this component? What component invokes the script?
Title: Re: Button copy text to clipboard?
Post by: heroclix on April 04, 2026, 20:48:30
no worries, i figured it out thanks