Closed elyasaf755 closed 4 years ago
I've found a solution to this. this is how i did it:
"ego.power-tools": {
"buttons":
[
{
"text": "Save & Compile",
"tooltip": "Compile all the .Jack files in the current folder.",
// Running the macro on button click
"action":
{
"type": "command",
"command": "macros.compile_button_click"
}
}
],
"commands": {
// Define a command that runs a script
"compile_folder": {
"script": "compile_folder.js"
}
}
},
"macros": {
// Define a macro command
"compile_button_click": [
"workbench.action.files.saveAll",
"compile_folder"
]
}
tl;dr: As the title says, is it possible to run a script through a macro? I've tried it, but unsuccessfully.
long story: There is this extension called "powertools", and I used it to add a custom button that runs a script when I click it. I wanna add a functionality to this button, such that each time I click the button, it saves all of my files using this command ID "workbench.action.files.saveAll", and then shall it run the script.
defining the button goes like this:
And I want the macro to look something like this:
Thanks in advance!
P.S - It is important that the macro will first save the files, and only then shall it execute the script