Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@spcsp/scripts-plus

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spcsp/scripts-plus

Enhance the scripting capabilities of S+ with a rich module library.

  • 0.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@spcsp/scripts-plus

Enhance the scripting capabilities of S+ with a rich module library.

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

Open the S+ console and in the script tab & paste this command

SPPM.Install("@spcsp/scripts-plus");

and click ▶ Execute

Usage

Open the main interface of StrokesPlus

  • Head to Global Actions
  • Open the Load/Unload tab
  • Check the box to enable the load script
  • Paste in this snippet: var $ = ScriptsPlus();
  • Now $.xxx methods are available in any script context

Examples

Wrapped Methods

// wraps `sp.MessageBox()`
$.alert("Hello World!");

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

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

Dialogs

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

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

getUserInput();

Popup Menus

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);

Keywords

FAQs

Package last updated on 25 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc