Welcome to Our Community

Some features disabled for guests. Register Today.

Macro Questions

Discussion in 'Control Software' started by Nick Marino, Oct 13, 2021.

  1. Nick Marino

    Builder

    Joined:
    Feb 1, 2018
    Messages:
    4
    Likes Received:
    1
    How do you delete a macro, seems to be no option on the macro tab other than ADD.

    I created 5 macros through the web interface expecting that they would show up under the app running on my shop PC and when I went out there and opened the macro tab there was nothing.

    I then went back to my office PC and opened Control again in a browser and all 5 macros I added were gone.

    Is there something special that needs to be done to make these addition persistent?
    Where are the macros stored on the PC running the app and where are they stored if created in the web interface.
     
  2. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,750
    Likes Received:
    4,265
    Localstorage in the browsers - each browser on each machine has its own private store. It cannot propogate around to remote windows. Remember, primarilly CONTROL is a desktop application. The webserver is actually for the mobile jog widget, and the full view is available as a courtesy. Recreate macros where you want them.


    Its persistant where you create it.


    Edit it using the little gear icon, on the Edit window, as a delete option:

    upload_2021-10-13_15-54-0.png
     
  3. Nick Marino

    Builder

    Joined:
    Feb 1, 2018
    Messages:
    4
    Likes Received:
    1
    But you should be able edit / manage them when its not. Would be more intuitive to just disable the ability to send it then totally disable the whole thing.

    BTW is there any way I could transfer the file stored in the browser local storage by hand to the App running on my shop computer without having to recreate them all in there, or is there maybe a backup and restore functionality that will do it?
     
  4. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,750
    Likes Received:
    4,265
    You can use the devconsole to serialize the buttons array entry to a string:
    Code:
    JSON.stringify(buttonsarray)
    
    and copy the string

    Then import it on the other end:

    Code:
    buttonsarray = JSON.parse('pasted string here')
    
    and save it to Localstorage:

    Code:
    localStorage.setItem('macroButtons', JSON.stringify(buttonsarray));
    
    But again, you're not using the application the way its actually intended. Don't create macros in the browser. Don't really use the browser except for the odd jogging operation, etc. Use the application, as a desktop application, as intended


    Not supported, just connect to the machine. Why would you use CONTROL without being connected - its a machine controller at the end of the day - most of the UI is disabled until you connect.
     
    #4 Peter Van Der Walt, Oct 13, 2021
    Last edited: Oct 13, 2021
  5. Nick Marino

    Builder

    Joined:
    Feb 1, 2018
    Messages:
    4
    Likes Received:
    1
    Interesting, is there any API documentation I might get to look at? May have some ideas of my own. :)
     
    #5 Nick Marino, Oct 13, 2021
    Last edited by a moderator: Oct 13, 2021
  6. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,750
    Likes Received:
    4,265
    Developers: API to Inject GCODE into CONTROL · OpenBuilds/OpenBuilds-CONTROL Wiki , and Getting started with Javascript Macros in CONTROL / Library of Macros created by the community is about it for documentation, but happy to provide insights if you need pointers. The source is on GitHub - OpenBuilds/OpenBuilds-CONTROL: OpenBuilds CONTROL: Download from https://software.openbuilds.com
     
    #6 Peter Van Der Walt, Oct 13, 2021
    Last edited: Oct 13, 2021
    Nick Marino likes this.
  7. Nick Marino

    Builder

    Joined:
    Feb 1, 2018
    Messages:
    4
    Likes Received:
    1

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice