Random Nodes

Random Nodes adds a grab bag of utility nodes: random numbers and choices, a chance gate, random delays, the current time, and what your media player is playing. This page describes version 1.2.0, which runs on Windows only. Install it from Manage plugins → Browse; it needs no setup. See how nodes work for how to read the node diagrams.

Where a node has both an input and a property with the same name, a connected input is used instead of the property.

Random

Random Number

Picks a random number between Min and Max.

Random NumberExecuteMinMaxDoneValueInteger
Inputs
ExecuteFlow
MinNumber
MaxNumber
Outputs
DoneFlow
ValueNumber
A random decimal from Min up to Max.
IntegerNumber
Value rounded to the nearest whole number.
Properties
Min
Default 0.
Max
Default 100.

If Min is greater than Max, the two are swapped.

Random Choice

Picks one item from a list.

Random ChoiceExecuteChoicesDoneChoiceIndexCount
Inputs
ExecuteFlow
ChoicesString
Overrides the property when connected and not empty.
Outputs
DoneFlow
ChoiceString
IndexNumber
Position of the choice, counting from 0.
CountNumber
How many items the list had.
Properties
Choices
Items separated by commas or new lines. Default one, two, three.

Spaces around items are trimmed and empty items are skipped. An empty list gives an empty Choice, an Index of -1, and a Count of 0.

Chance Gate

Sends flow one of two ways at random.

Chance GateExecuteChance %SuccessFailureRoll
Inputs
ExecuteFlow
Chance %Number
Outputs
SuccessFlow
Runs with the given chance.
FailureFlow
Runs otherwise.
RollNumber
The random roll, from 0 up to 100.
Properties
Chance %
The chance of taking Success, 0 to 100. Default 50.

Random Delay

Waits a random time, then continues.

Random DelayExecuteMin msMax msDoneDelay ms
Inputs
ExecuteFlow
Min msNumber
Max msNumber
Outputs
DoneFlow
Delay msNumber
How long it waited.
Properties
Min ms
Shortest wait, in milliseconds. Default 250.
Max ms
Longest wait, in milliseconds. Default 2000.

The wait is at most 10 minutes, and stops early if the flow is stopped. Like Delay, it holds up the rest of its branch while it waits.

Text and time

Text Contains

Checks whether some text contains a word or phrase, ignoring capitalization.

Text ContainsExecuteTextContainsTrueFalseMatches
Inputs
ExecuteFlow
TextString
The text to search.
ContainsString
Overrides the property when connected and not empty.
Outputs
TrueFlow
FalseFlow
MatchesBoolean
Properties
Contains
The text to look for.

An empty search value always goes to False.

Time Now

Outputs the current time.

Time NowExecuteDoneTimeLocalUTCUnix SecondsDay Of Week
Inputs
ExecuteFlow
Outputs
DoneFlow
TimeString
Local time such as 9:05 PM.
LocalString
Local date and time, in ISO 8601 format.
UTCString
UTC date and time, in ISO 8601 format.
Unix SecondsNumber
Day Of WeekString
In English, such as Monday.

Format Time

Formats a number of seconds as a duration, or a Unix timestamp as a clock time.

Format TimeExecuteValueDoneFormattedTimezoneError
Inputs
ExecuteFlow
ValueNumber
Outputs
DoneFlow
FormattedString
TimezoneString
The time zone used, for Unix timestamps.
ErrorString
Properties
Mode
Seconds to mm:ss, or Unix timestamp to hh:mm AM/PM. Default Seconds to mm:ss.
Value
Seconds or a Unix timestamp. Default 0.
Timezone
Local time, UTC, or Manual UTC offset. Used for Unix timestamps. Default Local time.
Manual UTC Offset Hours
For Manual UTC offset, such as -5 or 5.5. Default 0.

In Seconds to mm:ss mode, 125 becomes 2:05.

Media

These nodes read what's playing through Windows' media controls, the same information shown by the volume overlay. They always continue through Done; Found is false when nothing is playing.

Spotify Now Playing

Reads the track Spotify is playing, or the current media session if Spotify isn't open.

Spotify Now PlayingExecuteDoneFoundSong NameArtistAlbumPause/Play StatusIs PlayingCurrent Playtime SecondsSong Length SecondsProgress PercentSource AppError
Inputs
ExecuteFlow
Outputs
DoneFlow
FoundBoolean
Song NameString
ArtistString
AlbumString
Pause/Play StatusString
Such as Playing or Paused.
Is PlayingBoolean
Current Playtime SecondsNumber
Song Length SecondsNumber
Progress PercentNumber
Source AppString
ErrorString

Active Media Session

Reads whatever media Windows considers current, from any player.

Active Media SessionExecuteDoneFoundSong NameArtistAlbumPause/Play StatusIs PlayingCurrent Playtime SecondsSong Length SecondsProgress PercentSource AppError
Inputs
ExecuteFlow
Outputs
DoneFlow
FoundBoolean
Song NameString
ArtistString
AlbumString
Pause/Play StatusString
Is PlayingBoolean
Current Playtime SecondsNumber
Song Length SecondsNumber
Progress PercentNumber
Source AppString
ErrorString

Contributors

Thank you to everyone who has helped improve this documentation.