humanemulator.net — справка.
Продукт, демо и покупка — на
хуманэмулятор.рф
|
Демо
|
Купить
|
API
|
Changelog
set_install_folder
set_install_folder($folder); - Задать путь к папке куда установлено приложение LibreOffice. По умолчанию это "C:\Program Files\LibreOffice\program\"Функция на вход принимает параметры:
После выполнения функции возвращаемое значение будет равно одному из двух :
Пример использования
<?php // Scenario: Set the installation folder for LibreOffice $xhe_host = getenv("RPABOT_HOST_URL"); // подключим функциональные объекты, если еще не подключен if (!isset($path)){ // Path to the init.php file for connecting to the XHE API $path = "../../../Templates/init.php"; // Including init.php grants access to all classes and functionality for working with the XHE API require($path); } // начало echo "\n<span >libreOffice->".basename (__FILE__)."</span>\n"; // Example 1: Set the path to LibreOffice folder echo("\n\nExample 1: Set the path to LibreOffice folder\n"); $installPath = "C:\\Program Files\\LibreOffice\\program"; $result = SYSTEM::$libreOffice->set_install_folder($installPath); echo("Set install path to: $installPath\n"); var_export($result); // Quit the application WINDOW::$app->quit(); ?>
# Additional paths import sys sys.path.insert(0, '../../../Templates PY/') xhe_host = "127.0.0.1:3039" from xweb_human_emulator import * # 1 echo("1.Задать путь к уcтановленному Libre Office : "); echo(libreOffice.set_install_folder("C:\\Program Files\\LibreOffice\\program")); # Quit app.quit()
using System; // Scenario: Set the installation folder for LibreOffice namespace XHELibreOfficeExamples { class SetInstallFolderExample { static void Main(string[] args) { string xheHost = "127.0.0.1:7010"; // Initialize XHE API connection // In C#, you would initialize the XHE API client here // This is equivalent to including init.php in PHP // Start Console.WriteLine("\nlibreOffice->set_install_folder.cs"); // Example 1: Set the path to LibreOffice folder Console.WriteLine("\n\nExample 1: Set the path to LibreOffice folder"); string installPath = "C:\\Program Files\\LibreOffice\\program"; bool result = libreOffice.set_install_folder(installPath); Console.WriteLine($"Set install path to: {installPath}"); Console.WriteLine(result.ToString()); // Quit the application app.quit(); } } }
// подключим функциональные объекты, если еще не подключен xhe_host="127.0.0.1:3039"; require("../../../Templates JS/init.js"); // начало echo("<hr><font color=libreOffice>set_install_folder.beep</font><hr>"); // 1 echo("1.Задать путь к уcтановленному LibreOffice : "); echo(libreOffice.set_install_folder("C:\\Program Files\\LibreOffice\\program")); // Quit app.quit();
=============================================
libreoffice Объекты DOM System Vision Web Window
=============================================
если что-то непонятно или необходимо узнать или считаете что надо добавить по работе этой функции, пишите в комментарии или на наш форум
.