You are here

Scripting with Lua

2 posts / 0 new
Last post
krischan
Offline
Last seen: 14 years 2 weeks ago
Joined: 2010-11-23 03:25
Scripting with Lua

Hi,
I am very new to Toucan-Scripting and I can´t figure out, why it is not working.

In detail I try perform several jobs with scripting. The script shall be started from a bat-file.
Everything works fine, if my script looks like this:

--Here starts the LUA-Script
sync([[c:\\temp\\quelle]], [[c:\\temp\\@dayname@]], [[Mirror]])
--...here there are many sync-jobs
--Here ends the LUA-Script

But when I want to add more options, my script wont run at all - I am about do despair!

Here is the job, followed by one of my tries for a LUA-script which doesn´t run:

[sync-1]
Source=c:\\temp\\quelle
Dest=c:\\temp\\@dayname@
Function=Mirror
CheckSize=1
CheckTime=0
CheckShort=1
CheckFull=0
TimeStamps=1
Attributes=0
IgnoreReadOnly=1
Recycle=0
PreviewChanges=0
Rules=
Type=Sync
--Here starts the LUA-Script
sync([[c:\\temp\\quelle]], [[c:\\temp\\@dayname@]], [[Mirror]], checks = "1, 0, 1, 0" , options = " 1, 0, 1, 0, 0, 0")
--...here there are many sync-jobs
--Here ends the LUA-Script

Thanx in advance for any help.

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 11 years 2 months ago
Developer
Joined: 2005-12-10 15:22
You

have a couple of options. As you seem to have your jobs already saved you could just do

sync(sync-1)

And that would work fine. Otherwise the way you specify your options isn't correct, it should be:

sync([[c:\\temp\\quelle]], [[c:\\temp\\@dayname@]], [[Mirror]],{size = true, time = false, short = true, full = false}, {timestamps = true, attributes = true, ignorero = false, ignoredls = false, recycle = false, previewchanges = false}
Log in or register to post comments