• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Copy Clipboard to text

Engaged ,
Feb 06, 2019 Feb 06, 2019

Copy link to clipboard

Copied

I just found this while searching for copy Clipboard to Text :

    function copyTextToClipboard(txt)

    {

      const keyTextData = app.charIDToTypeID('TxtD');

      const ktextToClipboardStr = app.stringIDToTypeID("textToClipboard");

      var textStrDesc = new ActionDescriptor();

      textStrDesc.putString(keyTextData, txt);

      executeAction(ktextToClipboardStr, textStrDesc, DialogModes.NO);

    }

How might I change this to do the opposite of the code above?    Couldn't find textFromClipboard or clipboardToText in search.

Thanks,

RONC

PS will new Plugin For VisualStudioCode to replace ESTK handle bringing Actions to JSX the same as now?

TOPICS
Actions and scripting

Views

971

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Feb 06, 2019 Feb 06, 2019

Copy link to clipboard

Copied

LATEST

Text from the clipboard is Ctrl+V or CMD+V Paste. The script code you posted is Action Manager code that Adobe Plug-in Scriptlistener recorded in its VBS log on someone's desktop the programmer modified the code to turn it into a function they use scipting Photoshop.

There is DOM support for paste  the javaScript form would be app.activeDocument.paste() a true parm would make it a past into. I do not know anything about VBS and only hack at javascript.     appRef.ActiveDocument.Paste() vbs

In Photoshop you can Paste Text into Photoshop Text  tool in input or edit mode but, you can not paste text into a a layer. Paste normally create a raster image layer.  You you need to add an art layer then make the layer kind text and set all the attributes and set its content.

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines