Javascript Macro Runner
This extension allows you to read and modify the current file (or other files in the workspace) with some quickly written JavaScript.
NOTE: the documentation has moved to the New Macro
command template.
MacroRunner.newMacro
New Macro (Macro Runner) Opens and creates a new macro next to the currently opened file. It is just an untitled JavaScript file with some boilerplate, and also includes documentation for the entire API that has been exposed to macros. (This documentation used to be in this readme, and it was a pain to find).
MacroRunner.runMacro
Run Macro (Macro Runner) Finds a macro in one of the open editor columns, and runs it on a file in one of the other editor columns.
MacroRunner.runMacroLF
Run Macro (For large files > 50mb) (Macro Runner) Finds a macro in one of the open editor columns, loads all contents of a file chosen with a file picker to an untitled document, and runs the macro on that untitled document. This a workaround I came up with for vscode extensions not supporting files > 50mb (jjuback/gc-excelviewer#49), which are pretty easy to run into when processing large JSON or CSV blobs.
MacroRunner.runSavedMacro
Run saved macro (Macro Runner) Loads a saved macro, and runs it on the file that is currently being edited.
MacroRunner.cancelAllMacros
Cancel signal to running macros (Macro Runner) Sends a cancellation signal to all long-running macros. Whether they are actually cancelled or not depends on if they were coded correctly, because I wasn't able to figure out how to break infinite loops without Task Manager.
MacroRunner.loadMacro
Load Macro (Macro Runner) Loads a saved macro, and opens it beside the current file, as done with the new macro template.
MacroRunner.saveMacro
Save Macro (Macro Runner) Saves a macro to the extension directory, where you can load, run or delete it later.
MacroRunner.removeMacro
Delete Macro (Macro Runner) Deletes a macro that was saved to the extension directory.
MacroRunner.openMacrosDirectory
Open Macros directory (Macro Runner) Opens a file explorer at the extension directory.
MacroRunner.macroSlot[0 to 10]
[ Not implemented yet ] Macro Slots 0 to 10 (Macro Runner) Assign these slots to saved macros in the extension settings. You can then run > Run Macro Slot 0 or whatever as a single command instead of going through the file picker. This also allows you to bind hotkeys to saved macros.