Jump to content

Recommended Posts

Posted

You can copy and paste stuff in FileMaker: Layouts, script steps, scripts, custom functions, value lists, fields and table definitions. Each time FileMaker puts a XML on the clipboard, but you can't see it. It is kind of hidden, so FileMaker can find it for pasting. But you can't just paste it to your favorite text editor.

With MBS Plugin 15.4 we change this. Our plugin monitors when FileMaker goes to back or comes to the front and updates the clipboard:

If the clipboard has FileMaker's XML, we copy the XML into the text section, so you can paste it in a text editor.

If the clipboard has text, which is valid XML for FileMaker, but not yet the section that FileMaker looks for, we copy the XML into the right section. Then you can paste in FileMaker as usual.

You may wonder why we do this? Well we like to edit the XML in a text editor like BBEdit and then put it back.

Let's say we have a script like this in FileMaker and copy the script steps:

If [ $$test > 0 ]
	Set Variable [ $$test ; Value: $$test + 1 ]
End If

When you copy this, let the plugin convert it and paste it to your editor:

<fmxmlsnippet type="FMObjectList">
  <Step enable="True" id="68" name="If">
    <Restore state="False"/>
    <Calculation><![CDATA[$$test > 0]]></Calculation>
  </Step>
  <Step enable="True" id="141" name="Set Variable">
    <Value>
      <Calculation><![CDATA[$$test + 1]]></Calculation>
    </Value>
    <Repetition>
      <Calculation><![CDATA[1]]></Calculation>
    </Repetition>
    <Name>$$test</Name>
  </Step>
  <Step enable="True" id="70" name="End If"/>
</fmxmlsnippet>

We can now do search and replace to change $$test to $$counter and copy it back to FileMaker.

What would you with this? 
We frequently love do to batch changes and then paste the modified XML back.

If that function causes trouble or you don't like it, please use SyntaxColoring.ClipboardConverter.SetEnabled functions to disable it.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.