ImGUI "SetClipboardText" not copying anything or error message to clipboard

hey vvvv peeps,

I am working on a project where I use an arduino with a button and a potentiometer to print ASCII Art onto a miro board (or a text editor in general). I use the potentiometer to change between different ASCII artworks to choose from and the button to print it. To print it I use the ImGui SetClipboardText node to copy text and then make use of the Vl.MouseKeyGlobal library to press CTRL + V globally for me.

So far so good! But here’s where I need your help. To copy the ASCII art I am using the ImGui SetClipboardText node as I said, but unfortunately it is not doing what it should be doing anymore, no matter what patch or what machine I am on, so I am kinda desperate :/

It either doesn’t copy anything at all to the clipboard, or an (error?) message.

The funny thing is though, that, as far as I remember, the node worked for me yesterday for an hour, that’s why I am even more confused. It would be super nice, if anyone could take a look at my patch and tell me, if there is anything I did wrong that could lead to me not copying anything at all, or this error message.

Screenshot of the nodes that print this.

The whole patch. Take a look at the left side, there’s the ImGui Clipboard node.
arduino-to-asciiart-patch.vl (61.1 KB)

<?xml version="1.0" encoding="utf-16"?>
<Patch xmlns:p="property" xmlns:r="reflection" Id="DgTzMmKgL82M4sfsrg9ZCr" MergeId="4645">
  <Canvas Id="JGZ5DKAJFnLNGRIJoXLBDG" MergeId="4646" CanvasType="Group">
    <Node Bounds="399,312,105,19" Id="KL1s5hJJ0EcOElWX0w8psi">
      <p:NodeReference LastCategoryFullName="IO.Global" LastDependency="VL.IO.MouseKeyGlobal.vl">
        <Choice Kind="NodeFlag" Name="Node" Fixed="true" />
        <Choice Kind="ProcessAppFlag" Name="KeyboardSimulator (Spread)" />
      </p:NodeReference>
      <p:HelpFocus p:Assembly="VL.Lang" p:Type="VL.Model.HelpPriority">High</p:HelpFocus>
      <Pin Id="KfY1ZtZRXX3LtcXKbFrLUt" Name="Key Codes" Kind="InputPin" />
      <Pin Id="Q3Hd0YZDe5IMEjbKMZAHeA" Name="Simulate" Kind="InputPin" />
      <Pin Id="CLKcuRNCYb3O6XC7rB8cEF" Name="Enable" Kind="InputPin" />
    </Node>
    <Node Bounds="499,288,65,19" Id="SNnC7viAnTQLrm21YRJCOv">
      <p:NodeReference LastCategoryFullName="Collections.Spread" LastDependency="VL.CoreLib.vl">
        <Choice Kind="NodeFlag" Name="Node" Fixed="true" />
        <Choice Kind="OperationCallFlag" Name="FromValue" />
        <CategoryReference Kind="RecordType" Name="Spread" NeedsToBeDirectParent="true" />
      </p:NodeReference>
      <Pin Id="PKtIJtfyVxTNT1emuWT9vY" Name="Input" Kind="InputPin" />
      <Pin Id="LAIBSU2WueZOpdGbjPqD1Y" Name="Result" Kind="OutputPin" />
    </Node>
    <Pad Id="L1lq3W2xn01NuA3BzSnPw3" Comment="Key Codes" Bounds="401,141,119,49" ShowValueBox="true" isIOBox="true">
      <p:TypeAnnotation LastCategoryFullName="Collections" LastDependency="VL.CoreLib.vl">
        <Choice Kind="TypeFlag" Name="Spread" />
        <p:TypeArguments>
          <TypeReference LastCategoryFullName="VL.IO.MouseKeyGlobal" LastDependency="MouseKeyGlobal.dll">
            <Choice Kind="TypeFlag" Name="Keys" />
          </TypeReference>
        </p:TypeArguments>
      </p:TypeAnnotation>
      <p:Value>
        <Item>RControlKey</Item>
        <Item>A</Item>
      </p:Value>
    </Pad>
    <Pad Id="SvMR4A35JYoLdWuBitbviI" Comment="Press" Bounds="501,208,35,35" ShowValueBox="true" isIOBox="true" Value="False">
      <p:TypeAnnotation LastCategoryFullName="Primitive" LastDependency="VL.CoreLib.vl">
        <Choice Kind="ImmutableTypeFlag" Name="Boolean" />
        <FullNameCategoryReference ID="Primitive" />
      </p:TypeAnnotation>
      <p:ValueBoxSettings>
        <p:buttonmode p:Assembly="VL.UI.Forms" p:Type="VL.HDE.PatchEditor.Editors.ButtonModeEnum">Toggle</p:buttonmode>
      </p:ValueBoxSettings>
    </Pad>
    <Node Bounds="499,264,179,19" Id="BAVHKgNBAjFPimCb1CcF2h">
      <p:NodeReference LastCategoryFullName="Primitive.Boolean" LastDependency="VL.CoreLib.vl">
        <Choice Kind="NodeFlag" Name="Node" Fixed="true" />
        <Choice Kind="OperationCallFlag" Name="OR" />
      </p:NodeReference>
      <Pin Id="AtJWIkMILdXOolpwWEKATs" Name="Input" Kind="StateInputPin" />
      <Pin Id="AVIhWtwcYrFLzb6aYRSr7W" Name="Input 2" Kind="InputPin" />
      <Pin Id="KUGwkl7m1GfLcLAvCRnbNu" Name="Output" Kind="StateOutputPin" />
    </Node>
    <Pad Id="UtYWb10IhbXNldrDlaZZn7" Comment="Stroke" Bounds="675,205,35,35" ShowValueBox="true" isIOBox="true" Value="False">
      <p:TypeAnnotation LastCategoryFullName="Primitive" LastDependency="VL.CoreLib.vl">
        <Choice Kind="ImmutableTypeFlag" Name="Boolean" />
        <FullNameCategoryReference ID="Primitive" />
      </p:TypeAnnotation>
      <p:ValueBoxSettings>
        <p:buttonmode p:Assembly="VL.UI.Forms" p:Type="VL.HDE.PatchEditor.Editors.ButtonModeEnum">Bang</p:buttonmode>
      </p:ValueBoxSettings>
    </Pad>
    <Node Bounds="653,90,85,19" Id="F5g0jPCD6ayMq3ONS1XtCH">
      <p:NodeReference LastCategoryFullName="Animation" LastDependency="VL.CoreLib.vl">
        <Choice Kind="NodeFlag" Name="Node" Fixed="true" />
        <Choice Kind="ProcessAppFlag" Name="LFO" />
      </p:NodeReference>
      <Pin Id="TBoJzwXPmOPQLkzLJ4aMeU" Name="Clock" Kind="InputPin" />
      <Pin Id="EJippVbUwBXL0Ghtoanh1a" Name="New Clock" Kind="InputPin" />
      <Pin Id="J6WwAXdSz2BLqoIZZgKGt9" Name="Period" Kind="InputPin" />
      <Pin Id="AgFau679oCrOq5N9pq2FTs" Name="Pause" Kind="InputPin" />
      <Pin Id="IT0rxojZNxROSYQYCKN2aL" Name="Reset" Kind="ApplyPin" />
      <Pin Id="KfgrPk9vr77O5BfYflURi7" Name="Phase" Kind="OutputPin" />
      <Pin Id="IEpzwFn3AXXMkd0vM0w9c6" Name="On New Cycle" Kind="OutputPin" />
      <Pin Id="RDLk5UFGSM5O9v7rEEnOhI" Name="Cycles" Kind="OutputPin" />
    </Node>
    <Pad Id="O35GYoCCJx1Ltg3JeVVo6d" Comment="Period" Bounds="655,61,35,15" ShowValueBox="true" isIOBox="true" Value="2">
      <p:TypeAnnotation LastCategoryFullName="Primitive" LastDependency="VL.CoreLib.vl">
        <Choice Kind="TypeFlag" Name="Float32" />
      </p:TypeAnnotation>
    </Pad>
    <Pad Id="IRfK0wsqMjnLcRnSDxhNG9" Comment="Connect Me" Bounds="675,147,35,35" ShowValueBox="true" isIOBox="true" Value="False">
      <p:TypeAnnotation LastCategoryFullName="Primitive" LastDependency="VL.CoreLib.vl">
        <Choice Kind="ImmutableTypeFlag" Name="Boolean" />
        <FullNameCategoryReference ID="Primitive" />
      </p:TypeAnnotation>
      <p:ValueBoxSettings>
        <p:buttonmode p:Assembly="VL.UI.Forms" p:Type="VL.HDE.PatchEditor.Editors.ButtonModeEnum">Bang</p:buttonmode>
      </p:ValueBoxSettings>
    </Pad>
  </Canvas>
  <Link Id="FltUvVYkQrdMGAz7XipOy1" Ids="L1lq3W2xn01NuA3BzSnPw3,KfY1ZtZRXX3LtcXKbFrLUt" />
  <Link Id="HyQmkT6aRCRPxIqdwoxQFS" Ids="LAIBSU2WueZOpdGbjPqD1Y,Q3Hd0YZDe5IMEjbKMZAHeA" />
  <Link Id="G1kU6ZtIeUGPxFkvuDCxuH" Ids="SvMR4A35JYoLdWuBitbviI,AtJWIkMILdXOolpwWEKATs" />
  <Link Id="OaQcOZYKyk4PdlxNteLQDx" Ids="UtYWb10IhbXNldrDlaZZn7,AVIhWtwcYrFLzb6aYRSr7W" />
  <Link Id="D3PHM4N6qluPw4xPdUyJVF" Ids="KUGwkl7m1GfLcLAvCRnbNu,PKtIJtfyVxTNT1emuWT9vY" />
  <Link Id="Sg16RhrYjnzLxxM8X9fhyV" Ids="O35GYoCCJx1Ltg3JeVVo6d,J6WwAXdSz2BLqoIZZgKGt9" />
  <Link Id="T0UOHhfq0h4PNyDrT9Zhxr" Ids="IEpzwFn3AXXMkd0vM0w9c6,IRfK0wsqMjnLcRnSDxhNG9" />
  <NugetDependency Id="NEkjZEyzmDqMWvsceupkPM" Location="VL.CoreLib" Version="2023.5.2" />
  <DocumentDependency Id="UKC3jgKgCejOotiKo3kBaS" Location="C:/Users/halon/AppData/Local/vvvv/gamma/nugets/VL.IO.MouseKeyGlobal.5.2.1/VL.IO.MouseKeyGlobal.vl" />
</Patch>

As I said, I’d be very thankful for any help, especially since this is for a project of mine on friday 😭

edit: by the way I can not go around the clipboard thingy, since MouseKeyGlobal makes the computer freeze for me, once you paste in tons of text

any imgui node has to be used inside an ImGui region. have a look at e.g. the helppatch of SetClipboardText to see it in use.

1 Like