Dise NSIS plugin

From DISE KnowledgeBase

Jump to: navigation, search

Contents

Overview

The Dise NSIS plugin (nsDiseFile.dll) can be used by NSIS scripts to read and write to Dise settings files.

Installation

Attach.png Download: Dise NSIS plugin

Just put the NSIS plugin into the NSIS\Plugins directory.

Info.png Read more: NSIS - How can I install a plugin

Info.png Read more: Remote Updates

Functions

All functions will put error message in $9 and status level in $8 (Empty if error and "OK" if success.).

When specifying the name of a value, this can either be just the name of the value if it is stored in the root of the file, or you can use dots to specify a sub-chunk. You can also use [#] to specify what chunk to access, if there are several with the same name. Look at the examples for more information.

Open

Syntax: _Open <file to open>
Example:

nsDiseFile::_Open /NOUNLOAD "C:\Program Files\Klocktornet\Dise 2010\Probe\Settings.ini"
DetailPrint $9

Save

Syntax: _Save <file to save to>
Example:

  nsDiseFile::_Save "C:\Program Files\Klocktornet\Dise 1.6\Probe\Settings.ini"

CreateChunk

Syntax: _CreateChunk <Name of chunk>
Example:

  nsDiseFile::_CreateChunk /NOUNLOAD "FTPSites.FTPSite[1].Test"
  DetailPrint $9

ValueExists

Syntax: _ValueExists <Name of value>
Example:

  nsDiseFile::_ValueExists /NOUNLOAD "FTPSites.FTPSite[1].Test[1].MyInt"
  DetailPrint $9

SetInt

Syntax: _SetInt <Name> <Integer to set>
Example:

  nsDiseFile::_SetInt /NOUNLOAD "FTPSites.FTPSite[1].Test[1].MyInt" 12345
  DetailPrint $9

SetString

Syntax: _SetString <Name> <String to set>
Example:

  nsDiseFile::_SetString /NOUNLOAD "FTPSites.FTPSite[1].MyString" "Testar att skriva en sträng"
  DetailPrint $9

GetInt

Syntax: _GetInt <Name>
Returns the value in $0
Example:

  nsDiseFile::_GetInt /NOUNLOAD "FTPSites.FTPSite.Retries"
  DetailPrint $0
  DetailPrint $9

GetString

Syntax: _GetString <Name>
Returns the value in $0
Example:

  nsDiseFile::_GetString /NOUNLOAD "FTPSites.FTPSite[1].Name"
  DetailPrint $0
  DetailPrint $9



All items on this website are copyright Klocktornet AB 2012, all rights reserved.
All trademarks are property of their respective owners.