Get the Text of a Script Contained inside a Primitive

3 September 2020

  • C11 - added.
getprimitivescripttext (Commands)
TypeCorrade progressive command
Commandgetprimitivescripttext
DescriptionThe getprimitivescripttext command is used to retrieve the text of a script inside a primitive's (task) inventory.
Permissionsinventory, interact
Parametersgroup, password, item, target
Last ChangesRelease 9.164 - added.

The getprimitivescripttext command is used to retrieve the text of a script inside a primitive's (task) inventory.

Command Required Parameters Required Corrade Permissions Example
getprimitivescripttext group, password, item, target inventory, interact
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // Retrieve the text of a script from an in-world primitive.
            "command", "getprimitivescripttext",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            // The name or UUID of the script.
            "target", "New Script",
            "range", "5",
            // The in-world primitive name or UUID.
            "item", "myscriptedobject",
            "callback", wasURLEscape(URL)
        ]
    )
);
Optional Parameter Possible Value Description
range an integer value The range in meters to look for the primitive to retrieve a script's text from.
selection attached, rezzed or all (default: all) Either attached, rezzed or all for selecting only primitives or objects attached to avatars, primitives or objects rezzed in-world or all primitives or objects respectively.

Notes

  • The command will return the a base64, UTF-8 encoded string representing the script source code passed to the data parameter.
  • The string returned by the command can be decoded in LSL using llBase64ToString.
  • This command does not work around the grid permission system and therefore cannot retrieve the source code of a script that does not belong to the bot itself.

secondlife/scripted_agents/corrade/api/commands/getprimitivescripttext.txt ยท Last modified: 2022/11/24 07:45 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.