Table of Contents

Create Notecard

24 May 2020

  • C10 - added the ability to place embedded items at specified positions.

27 May 2017

  • Release 9.164 - added the ability to embed items into notecards via the attachments parameter; added the ability to set permissions on created notecards via the permissions parameter.

3 January 2017

  • Release 9.153 - the command now requires entity to be set and allows creating a notecard by reading a text file from the local storage that Corrade is running off.

7 October 2016

  • Release 9.134 - the command now returns the asset UUID and the inventory UUID of the created notecard if successful.
createnotecard (Commands)
TypeCorrade progressive command
Commandcreatenotecard
DescriptionThe createnotecard command can be used to create a new notecard in Corrade's inventory.
Permissionsinventory
Parametersgroup, password, name, entity
Last ChangesC10 - added the ability to place embedded items at specified positions.

The createnotecard command can be used to create a new notecard in Corrade's inventory.

Command Required Parameters Required Corrade Permissions Example
createnotecard group, password, name, entity inventory, system
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // creates a notecard called
            // "Hello" containing the
            // text "Good day!"
            "command", "createnotecard",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "entity", "text",
            "name", "Hello",
            "text", "Good day!"
        ]
    )
);
Optional Parameter Possible Value Description
permissions A string representing permissions in Corrade permission notation Set the permissions on the notecard.
description A string. The description of the notecard.
attachments A CSV string. A list of tokens by UUIDs or inventory paths to be used as embedded attachments for the notecard.
Parameter Possible Value Second Parameter Possible Value Description
entity text data The text contained in the notecard. Creates a notecard using the value passed to the optional parameter data as the notecard text and the value passed to the optional description parameter as the notecard description.
file path The path to a file on the local storage that Corrade is running off. Creates a notecard by reading the file passed to the optional path parameter and setting the notecard text to the contents of the file and optionally setting the description of the notecard to the value passed to the optional description parameter.
asset data Base64-encoded asset data such as the one returned by the download command. Creates a notecard from binary asset data.

Creating Notecards with Embedded Items

The following command will create a notecard and embed two items specified by their inventory path:

llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // creates a notecard called
            // with multiple atachments
            "command", "createnotecard",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "entity", "text",
            "name", "Test 12",
            "text", wasURLEscape("Good [1] day! [2]"),
            "description", "A test notecard",
            "attachments", 
                wasListToCSV(
                    [
                        "[1]", wasURLEscape("/My Inventory/Textures/AF_Leather.tga"),
                        "[2]", wasURLEscape("/My Inventory/Textures/xmas")
                    ]
            ),
            "callback", wasURLEscape(URL)
 
        ]
    )
);

The strings [1] and [2] are user-defined tokens and can be anything as long as the tokens are unique for each inventory item and the tokens do not conflict with the underlying supported output and/or input language; in the latter case, the tokens will have to be properly escaped (ie: wasURLEscape for WAS language).

The expected result of running the command will be the creation of a new notecard with the body being a concatenation of:

The tokens can be placed anywhere in the value of the text key. For instance, the command can be changed with the purpose of achieving a different embedded item order:

"text", "[1][2] Good day!"

will create a notecard with the two attachment items placed at the very beginning of the notecard and followed by the string Good day!.

Notes