Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.1 - 日本語

Change language to:
English - Français - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
However, this page did not exist in the previous stable version.

Scilabヘルプ >> Preferences > setPreferencesValue

setPreferencesValue

設定値を設定

呼び出し手順

setPreferencesValue(xpath, key_value [, doc])

引数

xpath

文字列, 設定ファイルのノードを取得する XPathリクエストを表す.

key_value

2xNの文字列行列, 設定するキーの値.

doc

XMLDoc型のmlist, 設定ファイルのXML文書.

説明

設定ファイル(SCIHOME+'/XConfiguration.xml') の属性の値を設定します.

誤って設定を修正するとScilabの動作を改変することになります.

docを指定した場合, 値はこの文書内で探されます. 複数のリクエストを実行する必要がある際, 同じ設定ファイルを重複してパースすることを避けるために 有用です.

有効な任意のXPathリクエストを指定できます. 例えば,proxy設定を書き込むXPathリクエストは以下のように 記述できます:

  • ファイルSCIHOME+'/XConfiguration.xml' を開き,指定したノードにアクセスするためのノード名を 取得します:

    <?xml version="1.0" encoding="utf-8" standalone="no"?>
    <interface height="600" path="1/" version="0.17" width="800">
        <general title="_(General)">
        ...
        </general>
        <web title="_(Web)">
            <body>
                <web command-browser="" command-mailer="" default-browser="true" default-mailer="true"/>
                <proxy enabled="false" host="" password="" port="" user=""/>
                <previous-proxy enabled="false" host="" password="" port="" user=""/>
            </body>
        </web>
        ...
    </interface>

    パスは"/interface/web/body/proxy" (または簡単化するために"//web/body/proxy") となります.

// カレントの値を取得
prev = getPreferencesValue("//web/body/proxy", ["enabled", "host", "port"]);
setPreferencesValue("//web/body/proxy", ["enabled", "host", "port"; "true", "my.proxy.org", "1234"]);
// 確認します
getPreferencesValue("//web/body/proxy", ["enabled", "host", "port"])
// 前の値に戻します
setPreferencesValue("//web/body/proxy", ["enabled", "host", "port" ; prev]);
getPreferencesValue("//web/body/proxy", ["enabled", "host", "port"])

参照

Report an issue
<< SciNotes preferences Preferences Windows tools >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 02 13:58:35 CEST 2014