Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkhill committed Jul 7, 2021
1 parent 622a9e5 commit 3628aea
Showing 1 changed file with 8 additions and 57 deletions.
65 changes: 8 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,13 @@
## ScriptsPlus, a StrokesPlus.net Plugin
## SPPM - Scripts Plus Plugin Manager

### Enhance the scripting capabilities of S+ with a rich module library.
### Enhance the scripting capabilities of StrokesPlus with community made plugins.
Inspired by the simplicity of jQuery, there are 40+ modules that extend and enhance the scripting capabilities within action scripts.
Many common `sp.xxxx` methods are wrapped to simplify their use and some wrapped together to create new tools.

# Install
Download `ScriptsPlusPlugin.dll` from here and place it in `C:\Program Files\StrokesPlus.net\Plug-Ins` to be automatically picked up by S+
You can also add it manually, or place it in your own plugins folder and add that path.
## Install
Download `sppm.dll` from here and place it in `C:\Program Files\StrokesPlus.net\Plug-Ins` to be loaded automatically. You can also load the plugin manually _or_ place it in your own plugins folder and add that path.

# Loading
- Head to `Global Actions`
- Open the `Load/Unload` tab
- Check the box to enable the load script
- Paste in this snippet: `var $ = ScriptsPlus();`
- Profit!

# Examples

### Wrapped Methods
```javascript
// wraps `sp.MessageBox()`
$.alert("Hello World!");

// wraps `new DisplayTextInfo()`
$.toast("Hello World!");

// wraps `sp.sp.ShowBalloonTip()`
$.balloon("Hello World!");
```

### Dialogs
```javascript
function getUserInput() {
var modal = $.dialog.create("Text Input Demo");

modal.show(input => $.alert(input, "Input"));
}

getUserInput();
```

### Popup Menus
```javascript
var { addToMenu, addToSubMenu, menuItem, show } = $.popup;

var popup = $.popup.create();
var addToMainMenu = $.popup.addToMenu(popup);

var mastercam = menuItem("Mastercam");
var addToDemo = $.popup.addToSubMenu(mastercam);

addToDemo(menuItem("Hello World", `$.alert('Hello World')`));
addToDemo(menuItem("Taco Bell", `$.alert('Taco Bell')`));
addToDemo(menuItem("Is Good", `$.alert('Is Good')`));

addToMainMenu(mastercam);
addToMainMenu($.popup.spacer);
addToMainMenu($.popup.cancel);

show(popup);
```
## Usage
There are two main Classes provided to S+
- `SPPM` is used to manage and load plugins into the script engine.
- `NPM` is used by `SPPM` for the heavy lifting and interacting with the file system.

0 comments on commit 3628aea

Please sign in to comment.