Scriptcase Help Center
Search for the articles here or browse the categories below.
Browse by topic
Find guides, tutorials, and answers organised by category.
Popular articles
What other people are reading right now.
System error, missing file api-ms-win-crt-runtime-l1-1-0.dll
This error is solved in two optional ways. A- Installing the software via windows upgrate Microsoft has created Visual C ++ Redistributable for Visual Studio 2015 on WindowsUpdate KB2999226. So you can install it through Windows Update. 1- Type Update inthe search box from Start. Then click on Check for updates (Windows10) or on Windows Update (Windows 7) in the result. 2- Click on check for updates 3- The program will look for updates and click install updates then restart the computer. B- Download the Visual C ++ executable file Redistributable for Visual Studio 2015 1- Download the pagehttps://www.microsoft.com/en-in/download/details.aspx?id=48145 2- Follow the installation instructions. 3- Restart the device.
What’s New in ScriptcaseAPI Configuration for Use with Scriptcase AI
Scriptcase AI uses APIs to communicate with artificial intelligence models, helping developers create, maintain, and evolve projects developed in Scriptcase. To use Scriptcase AI, it is not necessary to purchase a standard subscription, such as ChatGPT Plus, Google AI Pro, or any other equivalent plan. These subscriptions are not required to use the API, their purpose is to allow access to the paid version of the AI assistant directly through the provider's own website. When using Scriptcase AI with an API key, billing is based on demand, considering factors such as the model used, the volume of requests made, and the number of tokens processed. However, in the standard subscription plans, the amount will be charged regardless of usage during that month. It is not necessary to purchase a standard subscription, such as ChatGPT Plus or Google AI Pro, to use Scriptcase AI through the API. How values are calculated This consumption is measured in tokens, which represent small parts of the content sent to and received from the AI, such as texts, instructions, questions, code snippets, and responses generated by the model. In each interaction, the API counts the input tokens, referring to the content sent to the AI, and the output tokens, referring to the generated response. In practice, common tasks, such as generating suggestions, translating content, reviewing small excerpts, explaining errors, adjusting parts of code, or assisting in the creation of applications, tend to consume a reduced number of tokens. Example of values by model and token The values below, obtained on 06/11/2026 from the official pages**,** refer to API usage and are intended only to demonstrate the cost difference between models. Prices may change, so it is recommended to always check the official pages before purchasing. ChatGPT (OpenAI API Pricing): https://developers.openai.com/api/docs/pricing Gemini API Pricing: https://ai.google.dev/gemini-api/docs/pricing 1 million tokens represents approximately between 600,000 and 750,000 words, depending on the language and the type of content processed. | Provider | Model | Input | Output | Notes | | -------- | ---------------------- | ---------------------- | ----------------------- | -------------------------------------------------------------------------------------- | | OpenAI | gpt-5.5 | US$ 5,00 per 1M tokens | US$ 30,00 per 1M tokens | Most capable model, with higher cost | | OpenAI | gpt-5.4-nano | US$ 0,20 per 1M tokens | US$ 1,25 per 1M tokens | Lightweight, cost-effective model. Primarily used for Scriptcase AI intelligent tasks. | | Gemini | Gemini 3.1 Pro Preview | US$ 2,00 per 1M tokens | US$ 12,00 per 1M tokens | Most capable model | | Gemini | Gemini 2.5 Flash-Lite | US$ 0,10 per 1M tokens | US$ 0,40 per 1M tokens | Lightweight, cost-effective model. Primarily used for Scriptcase AI intelligent tasks. | Generate an API Key GPT / OpenAI To use GPT models in Scriptcase A, you need to access the OpenAI developer platform and generate an API key. Step-by-step 1. Access the OpenAI Platform. 2. Log in with an OpenAI account. 3. If the user already uses ChatGPT, they can use the same login. However, API usage has separate configuration and billing from the ChatGPT subscription. 4. Access the Billing area. 5. Configure the payment method or add credits for API usage. 6. The OpenAI API works with consumption-based billing. Added credits are consumed as requests are made. 7. Access the API Keys area. 8. Create a new API key. 9. Copy the generated key and store it in a safe place. 10. The key must be saved at the time of creation. For security reasons, the platform may not display the full key again afterward. 11. In Scriptcase, access the Scriptcase AI configuration. 12. Select the OpenAI/GPT provider. 13. Enter the generated API key. 14. Save the configuration and perform a connection or AI usage test. Monitoring API Usage The platform dashboard provides detailed metrics on costs, request volume, and rate limits. 1. Access the OpenAI Platform website and sign in. 2. In the left-side menu, go to Usage to view a detailed breakdown of daily token consumption by model (such as GPT-5.5 or GPT-5.4 Nano) and accumulated costs. You will see a detailed dashboard containing all information related to your API usage. Generate an API Key Gemini / Google To use Gemini models with Scriptcase AI, you must access Google AI Studio or configure a project in Google Cloud and generate an API key. Step-by-Step 1. Access Google AI Studio. 2. Sign in with a Google account. 3. Accept the Terms of Service if this is your first access. 4. Go to the API Keys section. 5. Create a new API key. On future accesses, Google AI Studio may automatically create a default project linked to your account. You can also use or import an existing Google Cloud project. 6. Copy the generated API key. 7. If you need paid features or higher limits, configure billing for the project. 8. In Scriptcase, access the Scriptcase AI settings. 9. Select Gemini as the provider. 10. Enter the generated API key. 11. Save the configuration and perform a connection or AI usage test. Monitoring API Usage 1. Access the Google AI Studio Usage Dashboard. 2. Sign in with your Google account. There, you will find detailed charts showing daily usage, rate limits, and token consumption for each Gemini model. You will see a detailed dashboard containing all information related to your API usage. To access the API consumption view, you need to have the payment method configured. Recommendations Treat the API key as a password. Do not share it in chats, repositories, public pages, or places accessible to end users. Whenever possible, use a dedicated key for Scriptcase AI, monitor API usage, and configure usage limits in the provider. If you suspect the key has been exposed, replace it immediately and remove old keys that are no longer in use.
What’s New in ScriptcaseGetting a ChatGPT (OpenAI) API Key for Scriptcase AI
In this tutorial, you will learn how to create an API key on the OpenAI platform and configure it in Scriptcase AI to use the intelligent features available in your projects. Obtaining the OpenAI API key 1. Access the OpenAI platform with your account. 2. After logging in, access the API keys area. 3. Click the option to create a new API key. 4. Define a name and click Create secret key. The name is optional, but we recommend using an identification that makes it easier to manage it later in the list of keys. For more details about creating and managing API keys, see the official OpenAI documentation. 5. After generating the key, copy the displayed code and store it in a safe place. Save the secret key, as it will not be possible to view it again. Keep it protected, since anyone with your API key can make requests on your behalf. If you lose it, you will need to generate a new one. API Key Management On the API Keys screen, it is possible to manage the created keys. In the column highlighted in the image below, you can access the key management options, such as editing permissions or deleting the key. The complete key is only displayed at the time of creation. If you lose or do not save the key, you will need to create a new one and update the configuration in Scriptcase AI. Configuring Scriptcase AI 1. After logging in with an administrator account in Scriptcase, access the Tools > Scriptcase AI menu. 2. Copy the generated API key and paste it into the API Key field. In this step, enable the option to create and translate applications automatically and select the OpenAI Provider, as well as the Chat Model and Smart Tasks Model. 3. Project access permissions In the project list, define the access permissions of Scriptcase AI for each project. Enable Code View and grant access to the connections so that Scriptcase AI can analyze the code of the open event and access the structure of the database tables and fields. Scriptcase AI accesses only the database structure, such as tables and fields. It does not access or read the data stored in the database. 4. After entering the information, click save settings. The chat and smart tasks are now available. See more details about the options on the configuration screen in our documentation.
What’s New in ScriptcaseGetting a Gemini API Key for Scriptcase AI
In this tutorial, you will learn how to create a Gemini API key in Google AI Studio and configure it in Scriptcase AI to use intelligent features in your projects. Obtaining the Gemini API key 1. Access Google AI Studio with your Google account. 2. After logging in, access the API keys area. 3. On the API Keys screen, click Create API key. 4. Enter a name and click Create key. Create the API key using the Gemini default project or select an existing project. 5. After generating the key, copy the displayed code and store it in a safe place. Do not share, publish in repositories, or send the key to third parties. API key management On the API Keys screen, the created keys can be managed. In the highlighted column shown in the image below, you can copy the API key and monitor the usage of that specific key. Quote Whenever possible, use a dedicated key for Scriptcase AI. This makes it easier to control usage, identify consumption, and replace the key if necessary. Configure Scriptcase AI 1. After logging in with an administrator account in Scriptcase, access the menu Tools > Scriptcase AI. 2. Copy the generated API key and paste it into the API Key field. In this step, enable the option to create and translate applications automatically and select the Google provider, as well as the Chat Model and Smart Tasks Model. 3. Project access permissions In the project list, define the access permissions of Scriptcase AI for each project. Enable Code View and grant access to the connections so that Scriptcase AI can analyze the code of the open event and access the structure of the database tables and fields. Scriptcase AI accesses only the database structure, such as tables and fields. It does not access or read the data stored in the database. 4. After entering the information, click save settings. The chat and smart tasks are now available. See more details about the options on the configuration screen in our documentation.
ScriptcaseManual update of Scriptcase on Windows
The manual update of Scriptcase is performed using the compressed .zip, file available in the Scriptcase download area. This procedure replaces only the base Scriptcase files, which are responsible for the structure of the tool. The existing projects in the environment are not changed, removed, or overwritten during the update. Before starting the procedure, we recommend creating a backup of the projects and the current installation as a security measure. 1. Creating the backup The backup can be created through Scriptcase itself by accessing: Settings > Administration > Services > Backup Wait for the backup to finish before downloading the file through the tool interface. It is also possible to perform a manual backup by copying the current installation folder to another safe location. 2. Downloading the update file Access the website download tab and download the latest version of Scriptcase in ZIP format for Windows. The downloaded file will be used to replace the base files of the current installation. 3. Extracting the compressed file After completing the download, extract the contents of the .zip file to a temporary folder. Example: C:\Users\User\Downloads\scriptcase\scriptcase-10.0.000 Inside the extracted folder (scriptcase-10.0.000), you will find the files of the new Scriptcase version. 4. Copying the files from the new version Select all files and folders from the new Scriptcase version. Copy this content. 5 - Pasting the files into the current installation Paste the copied files into the current Scriptcase folder. Destination example: C:\Program Files\NetMake\v9-php82\wwwroot\scriptcase When Windows asks for confirmation to replace the existing files, confirm the replacement. 6. Waiting for the copy process to finish and accessing Scriptcase Wait until all files are copied and replaced. After the file replacement is complete, access Scriptcase normally through the browser. Use the same address used before the update. Example: http://127.0.0.1:8093/scriptcase
ScriptcasePHP 7.x to PHP 8.2 Migration Guide
Starting with release 9.13.012, Scriptcase is compatible with PHP 8.2, both in the development environment and in production. When migrating directly from PHP 7.x to PHP 8.2, custom code (events, methods, and internal or external libraries) may start generating warnings, deprecations, or even fail, due to behavior changes and the discontinuation of features introduced in newer PHP versions. This tutorial brings together the main points to watch for when migrating to PHP 8.2, with explanations and practical examples to help you adapt your code and reduce the impact during the update. 1) Nested ternary operators without explicit parentheses — Not allowed Conditional expressions using nested ternary operators without explicit parentheses are not allowed in PHP 8.2. This type of syntax can lead to ambiguities and is no longer accepted by the PHP interpreter. ❌ Not allowed example: 1. $result = $aa != "" ? $xxx : isset($bb) && $bb != "" ? $zzz : ""; ✅ Recommended approach: Rewrite the logic explicitly using conditional structures: 1. if ($aa != "") { 2. $result = $xxx; 3. } elseif (isset($bb) && $bb != "") { 4. $result = $zzz; 5. } else { 6. $result = ""; 7. } 2) Accessing array and string values using curly braces — Deprecated Accessing values from arrays and strings using the curly braces syntax {} is not allowed in PHP 8.2. This format is deprecated and may generate warnings or runtime errors. Always use square brackets [] to access indexes. ❌ Not allowed example: 1. $array = [1, 2]; 2. echo $array{1}; 3. $string = "foo"; 4. echo $string{0}; Quote This type of access generates messages such as: Deprecated: Array and string offset access syntax with curly braces is deprecated ✅ Correct approach: 1. $array = [1, 2]; 2. echo $array[1]; // outputs 2 3. $string = "foo"; 4. echo $string[0]; // outputs "f" 3) Required parameters after optional parameters — Deprecated Declaring functions or methods with required parameters after optional parameters is not allowed in PHP 8.2. This type of signature is considered incorrect and may generate warnings or deprecations at runtime. ❌ Not allowed example: 1. function foo($param_optional = null, $param_required) { 2. // ... 3. } Quote This type of declaration may generate messages such as: Deprecated: Required parameter $param_required follows optional parameter $param_optional ✅ Correct approach: Always declare required parameters first, followed by optional parameters: 1. function foo($param_required, $param_optional = null) { 2. // ... 3. } 4) Arithmetic operations with non-numeric strings — Not allowed Arithmetic operations involving non-numeric strings are not allowed in PHP 8.2. This type of operation may generate warnings or errors, because values that do not represent numbers are no longer implicitly treated as zero. ❌ Not allowed example: 1. $b = ""; 2. $a = $b + 2; Quote This type of operation may result in an error because $b does not contain a valid numeric value. ✅ Correct approach: Before performing the operation, make sure the value is numeric. Example 1 — direct validation: 1. $a = is_numeric($b) ? $b + 2 : 2; Example 2 — value normalization: 1. if (!is_numeric($b)) { 2. $b = 0; 3. } 4. $a = $b + 2; 5) Non-existent variables and indexes — Watch out for warnings Using undefined variables or non-existent array indexes may generate warnings in PHP 8.2. This happens when the code tries to access values that have not been defined yet. If warnings are enabled, these situations may result in frequent messages during runtime. ❌ Not recommended example: 1. $a = $b + 2; Or: 1. $a = $array['key'] + 2; Quote When $b or $array['key'] do not exist, a warning may be displayed. ✅ Correct approach: Before using a variable or an array index, check whether it exists. 1. $a = isset($b) ? $b + 2 : 2; Or, for arrays: 1. $a = isset($array['key']) ? $array['key'] + 2 : 2; 6) each() function — Removed The each() function returns the current key/value pair of an array and advances its internal pointer. This function is not available in PHP 8.2. If it is used in your applications, the code must be updated before deploying to an environment with PHP 8.2 or higher. Common replacement options: 1. foreach() 2. key() 3. current() 4. next() ❌ Not supported example: 1. $result = ""; 2. $tab = array( 3. 0 => array('tp' => 1, 'vl' => 'aaa'), 4. 1 => array('tp' => 2, 'vl' => 'bbb'), 5. 2 => array('tp' => 3, 'vl' => 'ccc') 6. ); 7. while (list($key, $val) = each($tab)) { 8. $result .= $tab[$key]["vl"]; 9. } ✅ Recommended approach (using foreach()): 1. $result = ""; 2. $tab = array( 3. 0 => array('tp' => 1, 'vl' => 'aaa'), 4. 1 => array('tp' => 2, 'vl' => 'bbb'), 5. 2 => array('tp' => 3, 'vl' => 'ccc') 6. ); 7. foreach ($tab as $key => $val) { 8. $result .= $tab[$key]["vl"]; 9. } 7) array\_key\_exists() function — Using it on objects is deprecated The array_key_exists() function checks whether a key or index exists in an array. In PHP 8.2, using this function to check object properties is deprecated. For this scenario, use isset() or property_exists(). ❌ Not recommended example: 1. if (array_key_exists('index', $array1)) { 2. // code 3. } ✅ Recommended approach: 1. if (isset($array1['index'])) { 2. // code 3. } 8) money\_format() function — Removed The money_format() function formats a number as a currency string. This function is not available in PHP 8.2. To format currency values, use the Intl extension through the NumberFormatter class. ❌ Not supported example: 1. echo money_format("%.2n", 1234.56); ✅ Recommended approach (using NumberFormatter): 1. $currencyObject = new NumberFormatter("pt-BR", NumberFormatter::CURRENCY); 2. echo $currencyObject->format(1234.56); 9) mb\_strrpos() function — Encoding parameter is deprecated The mb_strrpos() function finds the position of the last occurrence of a value in a string. In PHP 8.2, passing the encoding as the third parameter is deprecated. Instead, pass an offset as the third parameter and the encoding as the fourth. ❌ Not recommended example: 1. $string = 'O rato roeu a roupa'; 2. echo mb_strrpos($string, 'roeu', 'UTF-8'); ✅ Correct approach: 1. $string = 'O rato roeu a roupa'; 2. echo mb_strrpos($string, 'roeu', 0, 'UTF-8'); 10) Dynamic properties — Deprecated In PHP 8.2, creating properties that do not exist in the class directly on an object (for example, $obj->new = 1;) triggers a deprecation notice. This behavior is only allowed when the class explicitly permits dynamic properties or when the object is of type stdClass. Before (no warning): It was possible to create dynamic properties on objects without PHP emitting any warnings. 1. class User {} $u = new User(); 2. $u->name = "Ana"; // dynamic property PHP 8.2 (triggers deprecation): This type of usage now triggers a deprecation notice. To avoid it, you can: 1. Declare the property directly in the class; 2. Use the #[\AllowDynamicProperties] attribute (temporary workaround); 3. Use WeakMap when you do not have control over the class. 11) Relative callables — Deprecated Some callable formats that worked with call_user_func(), but do not work correctly when executed as $callable(), have been marked as deprecated in PHP 8.2. This includes calls that depend on class context, such as "self::method", "parent::method", "static::method" and ["self", "method"]. Avoid using: 1. call_user_func("self::doStuff"); 2. call_user_func(["self", "doStuff"]); Use instead: The fully qualified class name: 1. call_user_func("MyClass::doStuff"); 2. call_user_func(["MyClass", "doStuff"]); Or a closure, when you need access to the current context: 1. call_user_func(fn() => $this->doStuff()); 12) "${var}" and "${expr}" interpolation in strings — Deprecated In PHP 8.2, using string interpolation in the "${var}" and "${expr}" formats has been marked as deprecated, as this style is less clear and may cause ambiguity. Avoid: 1. echo "Hello ${name}"; 2. echo "Total: ${arr['total']}"; Use: 1. echo "Hello $name"; 2. echo "Hello {$name}"; 3. echo "Total: {${arr['total']}}"; // for expressions 13) utf8_encode() and utf8_decode() — Deprecated The utf8_encode() and utf8_decode() functions have been marked as deprecated in PHP 8.2, as they assume a fixed encoding, which may lead to incorrect results in different scenarios. Common replacements: 1. mb_convert_encoding($str, 'UTF-8', 'ISO-8859-1') // adjust the source encoding as needed 2. iconv('ISO-8859-1', 'UTF-8//TRANSLIT', $str) // when applicable Quote These functions assume ISO-8859-1 as the default encoding, which may cause confusion and incorrect conversions; therefore, they were deprecated. 14) Case-insensitive functions and uppercase/lowercase conversion — Behavior change In PHP 8.2, several functions that convert or compare text in a case-insensitive way now follow ASCII rules (default “C” locale). This includes functions such as strtolower(), strtoupper(), ucwords(), and str_ireplace(). With this change, these functions no longer consider language-specific rules, which may affect accented characters or languages with special capitalization rules, such as Portuguese (pt-BR) and Turkish (tr-TR). To correctly handle localized text or accented characters, use the MBString extension, for example: 1. mb_strtolower($text, 'UTF-8'); 15) glob() with open_basedir — Return value change In PHP 8.2, the behavior of the glob() function changed when the open_basedir directive is enabled. 1. If all paths are blocked by open_basedir, glob() now returns an empty array ([]) — previously, it returned false. 2. If only some paths are blocked, a warning may be displayed. Code that may be affected: 1. $files = glob($pattern); 2. if ($files === false) { 3. // ... 4. } Recommended adjustment: Update the check to also consider the [] return value, ensuring the code properly handles both scenarios. Fix (handle false and []): 1. $files = glob($pattern); 2. if ($files === false || $files === []) { 3. // No files found OR access blocked by open_basedir 4. // handle it here (fallback, logging, etc.) 5. } else { 6. foreach ($files as $file) { 7. // process files 8. } 9. } Shorter alternative (when you do not need to differentiate false from []): 1. $files = glob($pattern); 2. if (empty($files)) { 3. // empty ([]) or false 4. } else { 5. foreach ($files as $file) { 6. // ... 7. } 8. } 16) Other behaviors that may cause “side effects” (less common) In PHP 8.2, some smaller changes may cause differences in results for code that depends exactly on return values or data ordering. str_split("") now returns [] This may affect validations that always expect at least one item in the array. 1. var_dump(str_split("")); 2. // PHP 8.2: array(0) { } 3. // Before: array(1) { [0]=> string(0) "" } var_export() and fully qualified class names The var_export() function now exports class names using the fully qualified name (including \), especially when the class is inside a namespace. This may cause differences in automated tests, snapshots, or string comparisons. 1. namespace App\Model; 2. class User {} 3. echo var_export(new User(), true); 4. // PHP 8.2: \App\Model\User::__set_state(array( 5. // ... 6. // )) ksort() / krsort() with SORT_REGULAR and numeric strings In some cases, the order of elements may change when the array keys are numeric strings. For example, "2" and "10", because they follow the current comparison rules. 1. $a = ["10" => "dez", "2" => "dois", "1" => "um"]; 2. ksort($a, SORT_REGULAR); 3. var_dump(array_keys($a)); 4. krsort($a, SORT_REGULAR); 5. var_dump(array_keys($a));