Some code logo
Some code
HistoryCommunityDocumentationContact Us

Creating Actions

One of major benefits of working with “Some Code” is how easy it is to create custom actions.

Everything is user definable:

  1. Action Icon is user definable
  2. The design of Metadata tab is user definable
  3. Parameters list is user definable
  4. Parameter type is user definable
  5. Variables list is user definable
  6. Action script is user definable

Action Library

All currently installed actions are stored in Action library. This dialog allows to create new actions or download actions the from public library

Action Library

Download Actions

Download Actions

Creating New Action

To create new action click Add Action, fill in all necessary fields and press Save button

Action icons

Upload Action Icon

Metadata Tab

Metadata Tab

Metadata Tab defines action look and feel

Properties Tab

Properties Tab

Property types

Property Type

Script Tab

Script Tab

Script Example

const { backup, cleanPath } = require("./utils");

//NOTE: cleanPath function prevents access to the files or folders outside files directory

actionParameters.ExecutionResult = SUCCESS;
try {
  const file = cleanPath(actionParameters.file);
  await backup(file, logger, actionParameters.password);
} catch (e) {
  actionParameters.ExecutionResult = ERROR;
  stepExecutionInfo.message = e.message;
  logger.error(e.message);
}
return actionParameters.ExecutionResult;

Action code editor

Action definition is stored in JSON format. Code editor allows advanced users to edit Action definition manually.

Action code editor

Publish Action

This dialogue publishes action to the public library so it can be used by all users of Some code

Publish Action

Video Tutorial

24 August 2023

Back

Working With Actions

Download Some code

Linux 64 bit deb server Windows 64 Bit server Windows 64 Bit Desktop Windows 64 Bit Portable

Some code works on both Windows and Linux. Please contact us if you want to run Some code on a different OS. We will create a special build for you.