### Install process-nextick-args Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/node_modules/process-nextick-args/readme.md Install the process-nextick-args module using npm. ```bash npm install --save process-nextick-args ``` -------------------------------- ### Install isarray with component Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/node_modules/isarray/README.md Install the 'isarray' module using the component package manager. ```bash $ component install juliangruber/isarray ``` -------------------------------- ### Install ZXP Package using ExManCmd Source: https://context7.com/adobe-cep/cep-resources/llms.txt Use the ExManCmd command-line tool to install your signed ZXP package. This is the standard method for distributing and installing CEP extensions. ```bash # --- Install a ZXP (using ExMan CLI tool) --- # https://www.adobeexchange.com/resources/28 ExManCmd.exe /install MyExtension.zxp ``` -------------------------------- ### Install sqlstring Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/node_modules/sqlstring/README.md Install the sqlstring package using npm. ```sh $ npm install sqlstring ``` -------------------------------- ### Install MongoDB Driver from Repository Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/node_modules/mongodb/Readme.md Install the latest version of the MongoDB driver directly from the repository. ```bash npm install path/to/node-mongodb-native ``` -------------------------------- ### Install readable-stream Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/node_modules/readable-stream/README.md Install the readable-stream package using npm. ```bash npm install --save readable-stream ``` -------------------------------- ### Install safe-buffer Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/node_modules/safe-buffer/README.md Install the safe-buffer package using npm. ```bash npm install safe-buffer ``` -------------------------------- ### Install isarray with npm Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/node_modules/isarray/README.md Install the 'isarray' module using npm for use in your Node.js projects. It can then be bundled for browser use with tools like browserify. ```bash $ npm install isarray ``` -------------------------------- ### Install MySQL Node.js Driver Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/node_modules/mysql/Readme.md Install the mysql package using npm. For development versions, install directly from GitHub. ```sh $ npm install mysql ``` ```sh $ npm install mysqljs/mysql ``` -------------------------------- ### createObject Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/SampleLib_8cpp.html Example function demonstrating how to handle arguments with known types. ```APIDOC ## createObject ### Description Example of a function that takes arguments with a known type (because there is a signature for it). ### Method SAMPLIB long createObject(TaggedData *argv, long argc, TaggedData *result) ### Parameters - **argv** (TaggedData *) - Array of tagged data arguments. - **argc** (long) - The number of arguments. - **result** (TaggedData *) - Structure to hold the result. ### Response - **return value** (long) - Status code. ``` -------------------------------- ### Install bignumber.js with npm Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/node_modules/bignumber.js/README.md Install the bignumber.js library for use in Node.js projects via npm. ```bash $ npm install bignumber.js ``` -------------------------------- ### Install MongoDB Driver via npm Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/node_modules/mongodb/Readme.md Install the most recent release of the MongoDB driver from npm. ```bash npm install mongodb ``` -------------------------------- ### Version and Initialization Functions Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/globals_func.html Functions for getting the ExtendScript version and initializing/terminating the environment. ```APIDOC ## ESGetVersion() ### Description Retrieves the current version of the ExtendScript engine. ### Method (Implicitly C/C++ function) ### Endpoint N/A ### Parameters None explicitly documented. ### Request Example N/A ### Response N/A ## ESInitialize() ### Description Initializes the ExtendScript environment. ### Method (Implicitly C/C++ function) ### Endpoint N/A ### Parameters None explicitly documented. ### Request Example N/A ### Response N/A ## ESTerminate() ### Description Terminates the ExtendScript environment. ### Method (Implicitly C/C++ function) ### Endpoint N/A ### Parameters None explicitly documented. ### Request Example N/A ### Response N/A ## setVersion() ### Description Sets the version for the ExtendScript environment. ### Method (Implicitly C/C++ function) ### Endpoint N/A ### Parameters None explicitly documented. ### Request Example N/A ### Response N/A ``` -------------------------------- ### paramAny Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/SampleLib_8cpp.html Example function demonstrating how to handle arguments of any type. ```APIDOC ## paramAny ### Description Example of a function that takes an argument of any type. ### Method SAMPLIB long paramAny(TaggedData *argv, long argc, TaggedData *result) ### Parameters - **argv** (TaggedData *) - Array of tagged data arguments. - **argc** (long) - The number of arguments. - **result** (TaggedData *) - Structure to hold the result. ### Response - **return value** (long) - Status code. ``` -------------------------------- ### Create and Manage a Process Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/html/NativeFunction.html Creates a new process and then checks if it is running and retrieves its working directory. Use this to start external applications and monitor their status. ```javascript var text = "createProcess failed"; var progName = document.getElementById("CreateProProgramName").value; var arg1 = document.getElementById("CreateProArgument1").value; var arg2 = document.getElementById("CreateProArgument2").value; var createProcessResult = window.cep.process.createProcess(progName, arg1, arg2); if (0 == createProcessResult.err) { gPID = createProcessResult.data; text = "createProcess succeed, "; var isRunningResult = window.cep.process.isRunning(gPID); if (0 == isRunningResult.err) { if (true == isRunningResult.data) { $("#IsRunningCheckbox").attr("checked", "true"); } text += "isRunning succeed, "; } else { text += "isRunning failed, "; } var workingDirResult = window.cep.process.getWorkingDirectory(gPID); if (0 == workingDirResult.err) { $("#WorkingDir").val(workingDirResult.data); text += "getWorkingDirectory succeed"; } else { text += "getWorkingDirectory failed"; } } $("#CreateProcessDivResult").val(text); ``` -------------------------------- ### Define Plugin Entrypoints with entrypoints.setup() Source: https://github.com/adobe-cep/cep-resources/blob/master/UXP-Migration-Guide/README.md Use the `entrypoints.setup()` API to define handlers and menu items for your plugin's entry points. This includes configurations for the plugin itself, panels, and commands. ```javascript entrypoints.setup({ plugin: { create: (pluginData) => { console.log("Plugin created", pluginData); }, destroy: () => { console.log("Plugin destroyed"); } }, panels: { "com.example.myplugin.panel": { create: (panelData) => { console.log("Panel created", panelData); }, show: (panelData) => { console.log("Panel shown", panelData); }, hide: (panelData) => { console.log("Panel hidden", panelData); }, destroy: (panelData) => { console.log("Panel destroyed", panelData); }, invokeMenu: (menuId) => { console.log("Menu item invoked: ", menuId); }, menuItems: [ { id: "item1", label: "My Menu Item 1" }, { id: "item2", label: "My Menu Item 2", enabled: false }, "-", { id: "submenu1", label: "Submenu", submenu: [ { id: "subitem1", label: "Sub Item 1" }, { id: "subitem2", label: "Sub Item 2", checked: true } ]} ] } }, commands: { "com.example.myplugin.command1": { run: (commandData) => { console.log("Command executed", commandData); }, cancel: (commandData) => { console.log("Command cancelled", commandData); } } } }); ``` -------------------------------- ### Create and Start HTTP Server in Invisible Extension Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Invisible_Extension-12.0/html/index.html This code initializes the CSInterface, retrieves host environment details, and sets up an HTTP server. The server listens on a port determined by the host application ID and responds with application-specific information. Ensure the 'cep_node' module is available. ```javascript var httpServer; window.onload = function() { var csLib = new CSInterface(); var hostEnv = csLib.getHostEnvironment(); var appVersion = hostEnv.appVersion; var appId = hostEnv.appId; var port = 8000; switch (appId) { case 'PHXS': case 'PHSP': port = 8000; break; case 'PPRO': port = 8001; break; case 'PRLD': port = 8002; break; case 'IDSN': port = 8003; break; case 'AICY': port = 8004; break; case 'FLPR': port = 8005; break; case 'ILST': port = 8012; break; default: break; } var http = cep_node.require('http'); httpServer = http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Greetings from ' + appId + ' ' + appVersion); }).listen(port, '127.0.0.1'); }; window.onunload = function() { httpServer.close(); } ``` -------------------------------- ### ESInitialize Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/_sample_lib_8cpp.html Initializes the library and returns function signatures. ```APIDOC ## ESInitialize ### Description Initialize the library and return function signatures. ### Method SAMPLIB char * ### Parameters - argv (*TaggedData): An array of TaggedData structures representing arguments. - argc (long): The number of arguments. ### Returns - char *: A string containing function signatures. ``` -------------------------------- ### ESInitialize Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/BasicExternalObject_8cpp.html Initializes the library and returns function signatures for reflection purposes. ```APIDOC ## ESInitialize ### Description Initialize the library and return function signatures. These signatures have no effect on the arguments that can be passed to the functions. They are used by JavaScript to cast the arguments, and to populate the reflection interface. ### Method Signature ```cpp BASICEXTERNALOBJECT_API char* ESInitialize(const TaggedData **argv, long argc) ``` ### Parameters * **argv** (const TaggedData **) - An array of TaggedData pointers representing arguments. * **argc** (long) - The count of arguments. ### Return Value * (char *) - A string containing function signatures. ``` -------------------------------- ### Process Creation and Management Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/html/NativeFunction.html Demonstrates how to create a new process, check if it's running, and retrieve its working directory. ```APIDOC ## createProcess, isRunning, getWorkingDirectory ### Description These functions allow for the creation of new processes, checking their running status, and obtaining their working directory. ### Method window.cep.process.createProcess(programName, arg1, arg2) window.cep.process.isRunning(pid) window.cep.process.getWorkingDirectory(pid) ### Parameters #### createProcess - **programName** (string) - The name of the program to execute. - **arg1** (string) - The first argument for the program. - **arg2** (string) - The second argument for the program. #### isRunning - **pid** (number) - The process ID. #### getWorkingDirectory - **pid** (number) - The process ID. ### Response #### Success Response (createProcess) - **err** (number) - 0 on success, non-zero on failure. - **data** (number) - The process ID if successful. #### Success Response (isRunning) - **err** (number) - 0 on success, non-zero on failure. - **data** (boolean) - True if the process is running, false otherwise. #### Success Response (getWorkingDirectory) - **err** (number) - 0 on success, non-zero on failure. - **data** (string) - The working directory path if successful. ``` -------------------------------- ### Establish MySQL Connection Implicitly via Query Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/node_modules/mysql/Readme.md A connection can be implicitly established when the first query is executed. This is an alternative to explicit connection setup. ```javascript var mysql = require('mysql'); var connection = mysql.createConnection(...); connection.query('SELECT 1', function (error, results, fields) { if (error) throw error; // connected! }); ``` -------------------------------- ### Establishing a Connection Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/node_modules/mysql/Readme.md Demonstrates the recommended method for establishing a MySQL connection using `mysql.createConnection` and handling connection events. ```APIDOC ## Establishing a Connection The recommended way to establish a connection is this: ```js var mysql = require('mysql'); var connection = mysql.createConnection({ host : 'example.org', user : 'bob', password : 'secret' }); connection.connect(function(err) { if (err) { console.error('error connecting: ' + err.stack); return; } console.log('connected as id ' + connection.threadId); }); ``` Alternatively, a connection can be implicitly established by invoking a query: ```js var mysql = require('mysql'); var connection = mysql.createConnection(...); connection.query('SELECT 1', function (error, results, fields) { if (error) throw error; // connected! }); ``` Connection errors (handshake or network) are considered fatal. Refer to the Error Handling section for more details. ``` -------------------------------- ### ESInitialize Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/_sample_lib_8cpp.html Initializes the library and returns function signatures for JavaScript reflection. ```APIDOC ## ESInitialize ### Description Initialize the library and return function signatures. These signatures have no effect on the arguments that can be passed to the functions. They are used by JavaScript to cast the arguments, and to populate the reflection interface. ### Parameters - **_argv** (TaggedData *) - The JavaScript argument array. - **_argc** (long) - The argument count. ### Return Value (SAMPLIB char*) - A character pointer to the function signatures. ``` -------------------------------- ### CEP Extension Initialization and Localization Source: https://context7.com/adobe-cep/cep-resources/llms.txt Initializes the CSInterface, loads the resource bundle to populate UI elements with localized strings, and demonstrates manual access to localized strings. Also shows how to get the host environment's locale. ```javascript // js/main.js var csInterface = new CSInterface(); // Initialize resource bundle — auto-populates all [data-locale] elements var bundle = csInterface.initResourceBundle(); // bundle = { "panel.title": "My Extension", "btn.refresh": "Refresh", ... } // Manually access a localized string var loadingText = bundle["status.loading"]; console.log("Loading text:", loadingText); // "Loading..." (en_US) or "読み込み中..." (ja_JP) // Update status text after loading function setStatus(key) { document.getElementById("status").textContent = bundle[key] || key; } setStatus("status.ready"); // "Ready" // Check locale from host environment var env = csInterface.getHostEnvironment(); console.log("App UI locale:", env.appUILocale); // e.g. "ja_JP" ``` -------------------------------- ### myObj.setVersion JavaScript Example Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/_sample_lib_8cpp.html Example of how to call the setVersion function from JavaScript to change the version number. ```javascript myObj.setVersion(2); ``` -------------------------------- ### Basic MySQL Connection and Query Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/node_modules/mysql/Readme.md Demonstrates how to create a connection, execute a simple query, and end the connection. All methods are queued and executed sequentially. ```javascript var mysql = require('mysql'); var connection = mysql.createConnection({ host : 'localhost', user : 'me', password : 'secret', database : 'my_db' }); connection.connect(); connection.query('SELECT 1 + 1 AS solution', function (error, results, fields) { if (error) throw error; console.log('The solution is: ', results[0].solution); }); connection.end(); ``` -------------------------------- ### ESInitialize Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/_basic_external_object_8cpp.html Initializes the external object library and returns function signatures for ExtendScript to use. ```APIDOC ## ESInitialize ### Description Initializes the library and returns function signatures. These signatures have no effect on the arguments that can be passed to the functions. They are used by JavaScript to cast the arguments, and to populate the reflection interface. ### Parameters * `argv` ([TaggedData](struct_tagged_data__s.html) **) * `argc` (long) ### Returns (char *) - Function signatures. ``` -------------------------------- ### Get File Info Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/html/NativeFunction.html Controls the visibility of the 'Get File Info' UI element. Toggles the display for retrieving file information. ```javascript function onclickGetFileInfoBtn() { $("#ShowOpenDialogDiv").hide(); $("#ShowOpenDialogEXDiv").hide(); $("#ShowSaveDialogEXDiv").hide(); $("#ReadDirectoryDiv").hide(); $("#MakeDirDiv").hide(); $("#RenamePathDiv").hide(); $("#RenamePathSuccessLabel").hide(); $("#GetFileInfoDiv").show(); $("#ReadFileDiv").hide(); $("#WriteFileDiv").hide(); $("#SetFilePermissionDiv").hide(); $("#DeleteFileDiv").hide(); $("#DelFileSuccessLabel").hide(); $("#SFPFilePermissionSuccessLabel").hide(); } ``` -------------------------------- ### HTML Fly Out Menu Example Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/html/HTMLFeatures.html An example of an HTML fly-out menu. Menu items can be defined in HTML and their appearance customized via CSS. ```html * [menu item 1](#) * [menu item 2](#) * [Sub menu item 2-1](#) * [Sub menu item 2-2](#) * [menu item 3](#) * [sub menu item 3-1](#) * [sub menu 3-1-1](#) * [sub menu 3-1-2](#) * [sub menu item 3-2](#) * [Sub menu 3-2-1](#) * [Sub menu 3-2-2](#) ``` -------------------------------- ### Initialize Resource Bundle with CSInterface Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Documentation/CEP 12 HTML Extension Cookbook.md Initializes the resource bundle for the extension using the current application and UI locale. Call this during extension loading. ```javascript var csInterface = new CSInterface(); csInterface.initResourceBundle(); ``` -------------------------------- ### run Method Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/javascript/docs/classAlertBoxBuilder1.html Creates the Dialog and adds the ScriptUI components and event handlers. ```APIDOC ## run() ### Description Creates the Dialog and adds the ScriptUI components and event handlers. ### Method void ### Parameters None ``` -------------------------------- ### run() Method Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/javascript/docs/classSnpCreateCheckBoxRadioButtons.html Executes the main functionality of the snippet, creating a window with ScriptUI components and registering event handlers. ```APIDOC ## run() ### Description Functional part of this snippet. Create the window and add the ScriptUI components. Several event handlers are registered to capture user input. ### Method boolean run() ### Returns - boolean: True if the snippet ran as expected, false if otherwise. For this snippet, there is at present no code path that can return false, as the snippet can run in any app that supports ScriptUI. ``` -------------------------------- ### Set and Get Window Title Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Documentation/CEP 12 HTML Extension Cookbook.md APIs to set and get the title of extension windows. These functions work with modal, modeless, and panel extensions across various Adobe products. ```APIDOC ## CSInterface.prototype.setWindowTitle ### Description Sets the title of the extension window. ### Method `CSInterface.prototype.setWindowTitle(title)` ### Parameters #### Path Parameters - **title** (string) - Required - The desired title for the extension window. ## CSInterface.prototype.getWindowTitle ### Description Gets the current title of the extension window. ### Method `CSInterface.prototype.getWindowTitle()` ### Returns - **string** - The current title of the extension window. ``` -------------------------------- ### Callback for Get Purchase URL Response Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/html/AgoraLib.html Handles the callback after a get purchase URL request. It removes the message listener, logs the status and response, and enables a purchase URL button. ```javascript var getPurchaseUrlResponseCallback = function(resultObj) { VulcanInterface.removeMessageListener(AgoraLib.MESSAGE_TYPE, handleRequestCallback); addToStatus("getPurchaseUrlResponseCallback with statusCode: " + resultObj.statusCode + " status: " + resultObj.status + " and response: " + resultObj.response); agora_loadPurchaseUrl.disabled = false; }; ``` -------------------------------- ### Trust File Content Example Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/javascript/docs/classActionScriptDemo.html Example content for a trust file (.cfg) that specifies the path to a local SWF file to be trusted by the Flash Player. This allows the SWF to access both the network and local files. ```text SDKINSTALL\Resources\ActionScriptDemo.swf ``` -------------------------------- ### Running Integration Tests with MySQL Setup Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/node_modules/mysql/Readme.md Run integration tests after setting up a MySQL server. This includes creating a database and configuring environment variables for connection. ```sh $ mysql -u root -e "CREATE DATABASE IF NOT EXISTS node_mysql_test" $ MYSQL_HOST=localhost MYSQL_PORT=3306 MYSQL_DATABASE=node_mysql_test MYSQL_USER=root MYSQL_PASSWORD= FILTER=integration npm test ``` -------------------------------- ### Get Scale Factor and Handle Changes Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/html/CSAPI.html Functions to get the current scale factor and register a handler for scale factor changes. The handler updates a counter and an image source based on the scale factor. ```javascript function onclickGetScaleFactorBtn(){ $("#OpenUrlDiv").hide(); $("#GetExtensionIdDiv").hide(); $("#GetCurrentApiVersionDiv").hide(); $("#IsWindowVisibleDiv").hide(); $("#GetScaleFactorDiv").show(); $("#LoadWebSiteWithInvalidCertificateDiv").hide(); $("#SetAndGetWindowTitleDiv").hide(); } function onclickGetScaleFactor(){ document.getElementById("ScaleFactorText").value = CSLibrary.getScaleFactor(); } var scaleFactorHandlerTimes = 0; var scaleFactor; var imgSrc; window.scaleFactorHandler = function(){ scaleFactorHandlerTimes += 1; document.getElementById("SFCH").value = scaleFactorHandlerTimes; scaleFactor = CSLibrary.getScaleFactor(); if (2 == scaleFactor) { imgSrc = "../img/PS_r.png" } else { imgSrc = "../img/PS_AppIcon.png" } document.getElementById("SFCHimg").src = imgSrc; } CSLibrary.setScaleFactorChangedHandler(window.scaleFactorHandler); ``` -------------------------------- ### built Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/_sample_lib_8cpp.html Example of a function that returns a string. ```APIDOC ## built ### Description Example of a function that returns a string. ### Parameters - **argv** (TaggedData *) - Input arguments. - **argc** (long) - Number of arguments. - **result** (TaggedData *) - Output result. ### Return Value ESerror_t ``` -------------------------------- ### ESInitialize Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/SampleLib_8cpp.html Initializes the ExtendScript environment. This function is part of the direct interface. ```APIDOC ## ESInitialize ### Description Initializes the ExtendScript environment. This function is part of the direct interface. ### Parameters - **_argv_** ([TaggedData](structTaggedData__s.html) *) - **_argc_** (long) ``` -------------------------------- ### Initialize CSInterface and Event Listeners Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/html/index.html Initializes the CSInterface and sets up an event listener for theme color changes. This is crucial for dynamically updating the extension's appearance based on the host application's theme. ```javascript var CSLibrary = new CSInterface(); var imageURL; /** * This function will be called when PP's theme color been changed and it will change * extension's background color according to PP's. **/ function themeChangedEventListener(event) { changeThemeColor(); } /** * Add eventListener to listen PP's theme change event. **/ window.onload = function() { CSLibrary.addEventListener("com.adobe.csxs.events.ThemeColorChanged", themeChangedEventListener); /* store the original background image's path */ imageURL = document.getElementById("index_body").style.backgroundImage; checkNodeJS(); changeThemeColor(); }; ``` -------------------------------- ### paramString Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/_sample_lib_8cpp.html Example of a function that takes a string argument. ```APIDOC ## paramString ### Description Example of a function that takes a string argument. ### Parameters - **argv** (TaggedData *) - Input arguments. - **argc** (long) - Number of arguments. - **result** (TaggedData *) - Output result. ### Return Value SAMPLIB long ``` -------------------------------- ### paramBool Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/_sample_lib_8cpp.html Example of a function that takes a boolean argument. ```APIDOC ## paramBool ### Description Example of a function that takes a boolean argument. ### Method SAMPLIB long ### Parameters - argv (*TaggedData): An array of TaggedData structures representing arguments. - argc (long): The number of arguments. - result (*TaggedData): A TaggedData structure to store the result. ### Returns - long: Success or error code. ``` -------------------------------- ### run() Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/javascript/docs/classSnpCreateDialog.html Creates and displays a modaless dialog window. ```APIDOC ## run() ### Description Creates a window of type "palette" (a modeless dialog) and displays it. ### Method Member Function ### Parameters None ### Returns Boolean - True if the snippet ran as expected, false otherwise. ``` -------------------------------- ### requiredContext Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/javascript/docs/classMessagingBetweenApps-members.html Gets or sets the required context for the application. ```APIDOC ## requiredContext ### Description Gets or sets the required context for the application. ### Method APIDOC ### Endpoint N/A ### Parameters None ### Response #### Success Response (200) String representing the required context. ``` -------------------------------- ### numberOfMessagesToSend Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/javascript/docs/classMessagingBetweenApps-members.html Gets or sets the number of messages to send. ```APIDOC ## numberOfMessagesToSend ### Description Gets or sets the number of messages to send. ### Method APIDOC ### Endpoint N/A ### Parameters None ### Response #### Success Response (200) Integer representing the number of messages to send. ``` -------------------------------- ### Package and Sign Extension on Windows Source: https://context7.com/adobe-cep/cep-resources/llms.txt This command demonstrates how to package and sign an extension on a Windows system using ZXPSignCmd.exe. ```bash # --- Windows (64-bit) --- ZXPSignCmd.exe -sign .\com.mycompany.mypanel .\MyExtension.zxp MyCert.p12 "password123" ZXPSignCmd.exe -verify MyExtension.zxp ``` -------------------------------- ### paramFloat64 Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/_sample_lib_8cpp.html Example of a function that takes a 64-bit floating-point argument. ```APIDOC ## paramFloat64 ### Description Example of a function that takes a 64-bit floating-point argument. ### Parameters - **argv** (TaggedData *) - Input arguments. - **argc** (long) - Number of arguments. - **result** (TaggedData *) - Output result. ### Return Value SAMPLIB long ``` -------------------------------- ### paramInt32 Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/_sample_lib_8cpp.html Example of a function that takes a signed integer argument. ```APIDOC ## paramInt32 ### Description Example of a function that takes a signed integer argument. ### Method SAMPLIB long ### Parameters - argv (*TaggedData): An array of TaggedData structures representing arguments. - argc (long): The number of arguments. - result (*TaggedData): A TaggedData structure to store the result. ### Returns - long: Success or error code. ``` -------------------------------- ### CSInterface - getSystemPath() and getScaleFactor() Source: https://context7.com/adobe-cep/cep-resources/llms.txt Retrieves platform-specific filesystem paths and the current display scale factor for HiDPI support. Scale factor 1.0 is standard; 2.0 is Retina/HiDPI; -1.0 indicates an error. Also includes handling for monitor scale on Windows. ```APIDOC ## CSInterface - getSystemPath() / getScaleFactor() ### Description Retrieves platform-specific filesystem paths (user data, documents, extension root, host executable) and the current display scale factor for HiDPI support. Scale factor `1.0` is standard; `2.0` is Retina/HiDPI; `-1.0` indicates an error. On Windows, it can also retrieve the monitor scale factor. ### Method `getSystemPath(SystemPath)` `getScaleFactor()` `getMonitorScaleFactor()` (Windows only) ### Parameters #### `getSystemPath` Parameters - **SystemPath** (enum) - Required - Specifies the type of system path to retrieve. Possible values include `SystemPath.USER_DATA`, `SystemPath.MY_DOCUMENTS`, `SystemPath.EXTENSION`, `SystemPath.HOST_APPLICATION`. #### `getScaleFactor` Parameters None #### `getMonitorScaleFactor` Parameters None ### Request Example ```javascript var csInterface = new CSInterface(); // Get system paths var userDataPath = csInterface.getSystemPath(SystemPath.USER_DATA); var extensionPath = csInterface.getSystemPath(SystemPath.EXTENSION); // Get scale factor var scaleFactor = csInterface.getScaleFactor(); // Get monitor scale factor on Windows if (navigator.appVersion.toLowerCase().indexOf("windows") >= 0) { var monitorScale = csInterface.getMonitorScaleFactor(); console.log("Monitor scale:", monitorScale); } console.log("Extension root:", extensionPath); console.log("Scale factor:", scaleFactor); ``` ### Response #### Success Response - `getSystemPath()`: Returns a string representing the absolute path. - `getScaleFactor()`: Returns a number (e.g., `1.0` or `2.0`). - `getMonitorScaleFactor()`: Returns a number (>= `1.0`). #### Response Example ```json { "userDataPath": "/Users/john/Library/Application Support", "extensionPath": "/Users/john/Library/Application Support/Adobe/CEP/extensions/com.mycompany.mypanel", "scaleFactor": 2.0, "monitorScale": 1.5 } ``` ### Error Handling - `getScaleFactor()` returns `-1.0` on error. ``` -------------------------------- ### paramUInt32 Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/_sample_lib_8cpp.html Example of a function that takes an unsigned integer argument. ```APIDOC ## paramUInt32 ### Description Example of a function that takes an unsigned integer argument. ### Method SAMPLIB long ### Parameters - argv (*TaggedData): An array of TaggedData structures representing arguments. - argc (long): The number of arguments. - result (*TaggedData): A TaggedData structure to store the result. ### Returns - long: Success or error code. ``` -------------------------------- ### ESInitialize Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/_basic_external_object_8cpp.html Initializes the library and returns function signatures. This is typically the first function to be called when using the external object library. ```APIDOC ## ESInitialize ### Description Initialize the library and return function signatures. ### Method BASICEXTERNALOBJECT_API char * ### Parameters #### Path Parameters - **argv** (const [TaggedData](struct_tagged_data__s.html) **) - An array of variant data. - **argc** (long) - The argument count. ### Response #### Success Response (200) - Returns function signatures as a character pointer. ``` -------------------------------- ### Get All System Paths Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/html/CSAPI.html Retrieves all predefined system paths (EXTENSION, USER_DATA, COMMON_FILES, MY_DOCUMENTS, HOST_APPLICATION) using CSInterface.getSystemPath and displays them in their respective UI elements. ```javascript var CSLibrary = new CSInterface(); var PlugPlugExtensionPath; var PlugPlugUserDataPath; var PlugPlugCommonFilesPath; var PlugPlugMyDocumentsPath; var PlugPlugHostApplicationPath; function onclickGSPGetAllSytemPaths() { PlugPlugExtensionPath = CSLibrary.getSystemPath(SystemPath.EXTENSION); PlugPlugUserDataPath = CSLibrary.getSystemPath(SystemPath.USER_DATA); PlugPlugCommonFilesPath = CSLibrary.getSystemPath(SystemPath.COMMON_FILES); PlugPlugMyDocumentsPath = CSLibrary.getSystemPath(SystemPath.MY_DOCUMENTS); PlugPlugHostApplicationPath = CSLibrary.getSystemPath(SystemPath.HOST_APPLICATION); $("#GSPExtensionResult").val(PlugPlugExtensionPath); $("#GSPUserDataResult").val(PlugPlugUserDataPath); $("#GSPCommonFilesResult").val(PlugPlugCommonFilesPath); $("#GSPMyDocumentsResult").val(PlugPlugMyDocumentsPath); $("#GSPHostApplicationResult").val(PlugPlugHostApplicationPath); } ``` -------------------------------- ### Getting and Changing Extension Content Size Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Documentation/CEP 12 HTML Extension Cookbook.md Details how to get the current content size of an HTML extension using `window.innerWidth` and `window.innerHeight` (and `parent.window` for iframes), and how to change the content size using the `resizeContent` function, noting limitations for panel extensions in certain Adobe applications. ```APIDOC ## Getting Extension Content Size Getting extension content size can be done using `window.innerWidth` and `window.innerHeight`. However, if you are accessing these properties from inside an IFrame, you are actually accessing the properties of the IFrame's window object, not the ones for the HTML document. To access the top-most one, you will need to do `parent.window.innerWidth` and `parent.window.innerWidth`. ## Changing Extension Content Size Changing modal and modeless extension content size is supported in all Adobe applications that supports CEP. However, changing panel HTML extension size is not supported in Premiere Pro, Prelude, After Effects and Audition. ```javascript CSInterface.prototype.resizeContent = function(width, height) ``` The width and height parameters are expected to be unsigned integers. The function does nothing when parameters of other types are passed. Please note that extension min/max size constraints as specified in the manifest file apply and take precedence. If the specified size is out of the min/max size range, the min or max bounds will be used. When a panel is docked with other panels, there are chances that it won't resize as expected even when the specified size satisfies the min and max constraints. The restriction is imposed by host applications, not by CEP. ``` -------------------------------- ### SAMPLIB long paramString Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/SampleLib_8cpp.html Example of a function that takes a string argument. ```APIDOC ## SAMPLIB long paramString ### Description Example of a function that takes a string argument. ### Parameters * **argv** ([TaggedData](structTaggedData__s.html) *) - The JavaScript argument * **argc** (long) - the argument count * **result** ([TaggedData](structTaggedData__s.html) *) - The return value to be passed back to JavaScript ``` -------------------------------- ### run Method Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/javascript/docs/classSnpCreateProgressBar.html Creates a window, adds a progress-bar control, a text label, and buttons. Defines behavior for the buttons that increment or reset the progress value. ```APIDOC ## run() ### Description Creates a window, adds a progress-bar control, a text label, and buttons. Defines behavior for the buttons that increment or reset the progress value. ### Method `run()` ### Returns - Boolean: True if the snippet ran as expected, false otherwise. ``` -------------------------------- ### Initialize UI and System Paths Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/html/NativeFunction.html Initializes the CSInterface, sets default UI element visibility, and populates input fields with system-specific paths for various file and process operations. This is crucial for testing on different operating systems. ```javascript $(document).ready(function() { var gPID = -1; var CSLibrary = new CSInterface(); $("#ShowOpenDialogDiv").show(); $("#ShowOpenDialogEXDiv").hide(); $("#ShowSaveDialogEXDiv").hide(); $("#ReadDirectoryDiv").hide(); $("#MakeDirDiv").hide(); $("#MakeDirSuccessLabel").hide(); $("#RenamePathSuccessLabe").hide(); $("#RenamePathDiv").hide(); $("#GetFileInfoDiv").hide(); $("#ReadFileDiv").hide(); $("#WriteFileDiv").hide(); $("#WriteFileSuccessLabel").hide(); $("#SetFilePermissionDiv").hide(); $("#SFPFilePermissionSuccessLabel").hide(); $("#DeleteFileDiv").hide(); $("#DelFileSuccessLabel").hide(); $("#CreateProcessDiv").hide(); $("#SetStdOutHandlerDiv").hide(); $("#SetStdErrHandlerDiv").hide(); $("#WriteStdInDiv").hide(); $("#WaitForProcessDiv").hide(); $("#OnQuitProcessDiv").hide(); // initialize test values if ((navigator.platform == "Win32") || (navigator.platform == "Windows")){ var myDocumentsPath = CSLibrary.getSystemPath(SystemPath.MY_DOCUMENTS); document.getElementById("DeleteFilePath").value = myDocumentsPath + "/test.txt"; document.getElementById("ReadDirPath").value = myDocumentsPath; document.getElementById("MakeDirPath").value = myDocumentsPath + "/test"; document.getElementById("RPOldPath").value = myDocumentsPath + "/test"; document.getElementById("RPNewPath").value = myDocumentsPath + "/newTest"; document.getElementById("GFMTGetInfo").value = myDocumentsPath + "/test"; document.getElementById("ReadFilePath").value = myDocumentsPath + "/test.txt"; document.getElementById("WriteFilePath").value = myDocumentsPath + "/test.txt"; document.getElementById("SFPFilePath").value = myDocumentsPath + "/test.txt"; document.getElementById("CreateProProgramName").value = "C:/windows/system32/notepad.exe"; document.getElementById("SetStdOutProgramName").value = "C:/windows/system32/netstat.exe"; document.getElementById("SetStdErrProgramName").value = "C:/windows/system32/cmd.exe"; document.getElementById("WriteStdInProgramName").value = "C:/windows/system32/ftp.exe"; document.getElementById("WaitForProProgramName").value = "C:/windows/system32/notepad.exe"; document.getElementById("OnQuitProProgramName").value = "C:/windows/system32/notepad.exe"; document.getElementById("CreateProArgument1").value = ""; document.getElementById("CreateProArgument2").value = ""; document.getElementById("SetStdOutArgument1").value = "-e"; document.getElementById("SetStdOutArgument2").value = "-s"; document.getElementById("SetStdErrArgument1").value = ""; document.getElementById("SetStdErrArgument2").value = ""; document.getElementById("WriteStdInArgument1").value = ""; document.getElementById("WriteStdInArgument2").value = ""; document.getElementById("WaitForProArgument1").value = ""; document.getElementById("WaitForProArgument2").value = ""; document.getElementById("OnQuitProArgument1").value = ""; document.getElementById("OnQuitProArgument2").value = ""; document.getElementById("SetStdErrInput").value = "aaaaa\r\n"; document.getElementById("StdInInput").value = "quit\r\n"; SODEXInitialPathVal = "C:\\"; SSDEXInitialPathVal = "C:\\"; document.getElementById("SODEXAllowMultipleSelection").checked = SODEXAllowMultipleSelectionVal; document.getElementById("SODEXChooseDirectory").checked = SODEXChooseDirectoryVal; document.getElementById("SODEXTitle").value = SODEXTitleVal; document.getElementById("SODEXInitialPath").value = SODEXInitialPathVal; document.getElementById("SODEXFileTypes").value = SODEXFileTypesVal; document.getElementById("SODEXFileTypes").disabled = document.getElementById("SODEXChooseDirectory").checked; document.getElementById("SODEXFriendlyFilePrefix").value = SODEXFriendlyFilePrefixVal; document.getElementById("SODEXFriendlyFilePrefix").disabled = document.getElementById("SODEXChooseDirectory").checked; document.getElementById("SODEXPrompt").value = "Only available on Mac"; document.getElementById("SODEXPrompt").disabled = true; document.getElementById("SSDEXTitle").value = SSDEXTitleVal; document.getElementById("SSDEXInitialPath").value = SSDEXInitialPathVal; document.getElementById("SSDEXFileTypes").value = SSDEXFileTypesVal; document.getElementById("SSDEXDefaultName").value = SSDEXDefaultNameVal; document.getElementById("SSDEXFriendlyFilePrefix").value = SSDEXFriendlyFilePrefixVal; document.getElementById("SSDEXPrompt").value = "Only available on Mac"; document.getElementById("SSDEXPrompt") } }); ``` -------------------------------- ### SoServerGetServer_f Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/_so_c_client_8h.html Function pointer type for getting the server handle and interface. ```APIDOC ## SoServerGetServer_f ### Description Represents a function pointer for obtaining the server handle and its associated interface. This is useful for further server-level operations. ### Signature ```c++ typedef ESerror_t (*SoServerGetServer_f)(SoHObject hObject, SoHServer *phServer, SoServerInterface_p *ppServerInterface); ``` ### Parameters * **hObject** (SoHObject) - Handle to an object associated with the server. * **phServer** (SoHServer *) - Pointer to a variable that will receive the server handle. * **ppServerInterface** (SoServerInterface_p *) - Pointer to a variable that will receive the server interface pointer. ``` -------------------------------- ### Create MySQL Connection and Query Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/node_modules/mysql/Changes.md Demonstrates how to create a new MySQL connection using `mysql.createConnection` and execute a simple query. This replaces the older `mysql.createClient()`. ```javascript var mysql = require('mysql'); var connection = mysql.createConnection({ host : 'localhost', user : 'me', password : 'secret', }); connection.query('SELECT 1', function(err, rows) { if (err) throw err; console.log('Query result: ', rows); }); connection.end(); ``` -------------------------------- ### Get Extension ID Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/html/CSAPI.html Retrieves the unique identifier for the current extension. ```APIDOC ## GetExtensionID ### Description Retrieves the unique identifier of the current extension. ### Method JavaScript function `CSLibrary.getExtensionID()` ### Details - This method is called internally by other functions, such as `initExtensionSizeAndConstraints` and `onClickRestoreDefaultWindowTitle`, to obtain the extension's ID. ``` -------------------------------- ### Make Directory Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/html/NativeFunction.html Creates a new directory at the specified path. A success label is shown if the directory is created without errors. ```javascript var result = window.cep.fs.makedir(path); if (0 == result.err) { $("#MakeDirSuccessLabel").show(); } else { $("#MakeDirSuccessLabel").hide(); } ``` -------------------------------- ### Require bignumber.js in Node.js Source: https://github.com/adobe-cep/cep-resources/blob/master/CEP_12.x/Samples/CEP_HTML_Test_Extension-12.0/node_modules/bignumber.js/README.md Import the bignumber.js library into your Node.js project after installation. ```javascript var BigNumber = require('bignumber.js'); ``` -------------------------------- ### SoObjectValueOf_f Typedef Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/SoCClient_8h.html Function pointer type for getting an object's value. ```APIDOC ## typedef ESerror_t (* SoObjectValueOf_f) (SoHObject hObject, TaggedData *pResult) ### Description Function to get an object's value. ### Parameters * **SoHObject hObject**: Handle to the object. * **TaggedData *pResult**: Pointer to store the object's value. ``` -------------------------------- ### run() Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/javascript/docs/classUsingFlashPlayer.html Executes the main functionality of the snippet, creating a dialog window with Flash playback controls. ```APIDOC ## run() ### Description Functional part of this snippet. Creates a dialog window and adds the ScriptUI components to it. Creates event handlers for the buttons that control the playback. ### Method `run()` ### Returns - Boolean: True if the snippet ran as expected, false otherwise ``` -------------------------------- ### SoObjectGet_f Typedef Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/SoCClient_8h.html Function pointer type for getting an object's property. ```APIDOC ## typedef ESerror_t (* SoObjectGet_f) (SoHObject hObject, SoCClientName *name, TaggedData *pValue) ### Description Function to get an object's property. ### Parameters * **SoHObject hObject**: Handle to the object. * **SoCClientName *name**: The name of the property. * **TaggedData *pValue**: Pointer to store the property value. ``` -------------------------------- ### SoCClientInitialize Source: https://github.com/adobe-cep/cep-resources/blob/master/ExtendScript-Toolkit/Samples/cpp/docs/cpp/_so_c_client_8h.html Initializes your client library by providing the client interface and memory interface functions. ```APIDOC ## SoCClientInitialize ### Description Initializes your client library. This function requires you to provide callbacks for your client interface (e.g., object initialization and retrieval) and your memory management (malloc/free). ### Parameters - **SoCClient_f** - A pointer to your client interface structure, which includes callbacks for object operations. - **SoMemoryInterface_p** - A pointer to your memory interface structure, containing functions for memory allocation and deallocation. ``` -------------------------------- ### Process Management with cep.process Source: https://context7.com/adobe-cep/cep-resources/llms.txt Demonstrates how to create, interact with, and manage OS-level processes using the `cep.process` API. This includes capturing stdout/stderr, writing to stdin, setting quit callbacks, and checking the running state. ```APIDOC ## Process Management with cep.process ### Description Creates and manages OS-level processes from within a CEP extension. All operations are synchronous. Returns `{ err, data }` where `data` is the process PID for `createProcess`. Useful for calling native tools like `ffmpeg`, `node`, or custom executables. ### Methods #### `cep.process.createProcess(executablePath, ...args)` Creates a new OS-level process. - **executablePath** (string) - Required - The full path to the executable. - **...args** (string) - Optional - Arguments to pass to the executable. **Returns**: An object `{ err, data }` where `err` is an error code and `data` is the process PID if successful. #### `cep.process.stdout(pid, callback)` Captures standard output from a running process. - **pid** (number) - Required - The process ID. - **callback** (function) - Required - A function to be called with the output string. #### `cep.process.stderr(pid, callback)` Captures standard error from a running process. - **pid** (number) - Required - The process ID. - **callback** (function) - Required - A function to be called with the error output string. #### `cep.process.stdin(pid, data)` Writes data to the standard input of a running process. - **pid** (number) - Required - The process ID. - **data** (string) - Required - The data to write to stdin. #### `cep.process.onquit(pid, callback)` Registers a callback function to be executed when the process exits. - **pid** (number) - Required - The process ID. - **callback** (function) - Required - A function to be called when the process quits. #### `cep.process.isRunning(pid)` Checks if a process is currently running. - **pid** (number) - Required - The process ID. **Returns**: An object `{ err, data }` where `data` is a boolean indicating if the process is running. #### `cep.process.terminate(pid)` Terminates a running process. - **pid** (number) - Required - The process ID. ### Error Codes - `cep.process.NO_ERROR` (0): No error occurred. - `cep.process.ERR_EXCEED_MAX_NUM_PROCESS`: The maximum number of processes has been exceeded. ### Example Usage ```javascript var procResult = cep.process.createProcess("/usr/bin/python3", "-c", "print('hello from python')"); if (procResult.err === cep.process.NO_ERROR) { var pid = procResult.data; cep.process.stdout(pid, function(output) { console.log("stdout:", output); }); cep.process.stderr(pid, function(errOutput) { console.error("stderr:", errOutput); }); cep.process.stdin(pid, "some input data\n"); cep.process.onquit(pid, function() { console.log("Process", pid, "has exited"); }); setInterval(function() { var runResult = cep.process.isRunning(pid); if (!runResult.data) { clearInterval(this); console.log("Process finished"); } }, 500); } else { console.error("Failed to start process, err:", procResult.err); } ``` ```