Part of Orthanc configuration file on lua scripting. Syntax example wanted.

Hello,

Trying to add lua-scripting to my (working) Orthanc-system on Windows 8.1 in order to get the WriteToDisk.lua script working.

Tried everything between the brackets in the orthanc.json configuration file to get it working, but as soon as I fill in a path between the brackets the server stops. I tried single quotes, double quotes, spaces, double backslashes, forward slashes etc. It costed me this afternoon. Does somebody have an example of this lua scripting path line from the orthanc.json file for a Windows system? Just to get a clue on the syntax?

Regards,
Eric Plankeel

Hello,

Have you tried to replace backslashes by two backslashes (i.e. replace "" by “\”), or to replace backslashes by forward slashes (i.e. replace "" by “//”)?

If this does not work, please post your configuration file so that other people can help.

Regards,
Sébastien-

Hello,

It took some time to get back to the system :frowning:

This is the corresponding part of my orthanc.json file. The directory does exist, no typo’s and name and directory are copy/pasted from the same script:

`

// List of paths to the custom Lua scripts that are to be loaded
// into this instance of Orthanc
“LuaScripts” : [ “C:\Orthanc”
],

// List

`

This results in a stopping Orthanc server.

Logfile displays:

`

W1006 12:51:41.723477 main.cpp:624] Installing the Lua scripts from: C:\Orthanc

E1006 12:51:41.724686 SystemToolbox.cpp:184] The path does not point to a regular file: C:\Orthanc

`

Hello,

The “LuaScripts” option expects a list of files, not a directory. The following snippet should do the work:

// List of paths to the custom Lua scripts that are to be loaded
// into this instance of Orthanc
“LuaScripts” : [ “C:\Orthanc\Script.lua” ],

Regards,
Sébastien-

Hello,

That was all I needed, thanks. It works. Now I can do some finetuning on the WriteToDisk.lua script. See if I get this script working as I want.

Regards,

Eric