Multiple custom buttons in 3-Matic only execute the last script

I am trying to set up several custom buttons in 3-Matic in the menu bar to run different Python scripts for separate, unrelated processes. I have registered each script separately, but when I click on any of the buttons, only the last script I ran is executed, regardless of which button is selected.

What I’ve tried so far:

  • Saved each script with a unique name and tested them separately.
  • Placed each script in its own folder and ran it at least once to confirm it works.
  • Restarting 3-Matic and clearing all on run.

Is 3-Matic limited to a single custom button or script?

Any advice would be much appreciated.

Hi Manni,

Welcome to the Scripting forum!

I was not able to reproduce your problem. I will share here the way of working to get your scripts available in the UI like this.

  1. Add it to the Quick Access Toolbar

  2. Open the Customize User Interface dialog and drag your script.py from the Quick Access Toolbar into your custom tab - or into an existing tab, whichever you prefer.

  3. With the Customize User Interface dialog open, you can change the name, icon, etc.

When clicked, that script will run.

Hope this helps!

Best,
Sjoerd

Hi Sjoerd,

Thank you for the reply.

The method you demonstrated works for scripts that are already located in the (C:\\\DemoFiles\Scripts) folder. However, when I add a button using a script from a different location via the “recent scripts” option, only the most recently executed script runs, regardless of which button I select.
Best,
Manni

I found the solution. I just needed to add the path to my scripts in Preference / Scrpting library / Folders.

Additionally, in my experience setting things up, I had to restart 3-matic for the change to appear correctly in the settings, if not also to take effect. I’m not sure if that was particular to me or if it remains an issue.