Single click file open in OpenBuilds CONTROL

A few days ago I wrote a post showing how to add a keyboard shortcut to open a file browser. But what if you want to completely remove the Open G-Code dropdown menu and add a button to single click to open a file browser? Its easy to do with a javascript macro.

Create a new macro. Give it a name. Click the Javascript tab on left side and add the following code.

$("#controlBtnGrp").prev("div").hide();
var openFileButton = `
<div class="group">
  <div>
    <button id="file" class="ribbon-button" onclick="socket.emit('openFile')">
      <span class="icon">
        <span class="fa-layers fa-fw">
          <i class="fas fa-folder-open fg-amber"></i>
        </span>
      </span>
      <span class="caption grblmode">Open<br>G-Code</span>
    </button>
  </div>
  <span class="title">File</span>
</div>`
$("#controlBtnGrp").before(openFileButton);

Make sure to enable “Run Macro on startup”.

If you are new to OpenBuilds CONTROL, be sure to check out my OpenBuilds CONTROL tutorial.

OpenBuilds Products I Use (affiliate):

OpenBuilds CONTROL​
Workbee 1510​ (similar to Lead 1010 or Lead 1515)
BlackBox Motion Controller​
BlackBox X32 Motion Controller
Interface CNC Touch Controller​
Router11
XYZ Touch Probe Plus

Tags:
0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*

©2024 Thayne Co

CONTACT ME

I'm not around right now. But you can send me an email and I'll get back to you, asap.

Sending

Log in with your credentials

Forgot your details?