One of the things that has been holding me back is my library of VBScripts that I needed to convert to JavaScript.
I've now bitten the bullet and created my first script. Complete with info.json.
However, when I open MM the script never shows. I've tried every conceivable way of adding the script - even creating an mmip and adding it manually from the Addons dialog. It installs, MM restarts, but no script is visible.
I've even tried using ChatGPT and Copilot and have tried different methods of creating actions and adding to menus, but still nothing.
I've pasted the very simple "smoke test" json and js below. Can someone please tell me where I'm going wrong?
I'm not intending on making the scripts public. I just want to add them myself as I can do in MM4.
TIA,
Roy
info.json
Code: Select all
{
"id": "SmokeTest",
"version": "1.0.0",
"title": "Smoke Test",
"description": "Smoke test for menu registration.",
"author": "Soundchaser",
"type": "script",
"main": "main.js",
"minAppVersion": "5.0.0"
}
Code: Select all
// Simple function to test execution
function smokeTest() {
app.showPopupMessage("Smoke test executed.");
}
// Register the action
actions.smokeTest = {
title: "Smoke Test",
icon: "",
execute: smokeTest
};
// Register the menu item
window._menuItems.push({
action: "smokeTest",
path: "Tools/SmokeTest"
});