Models 707B and 708B Switching Matrix Reference Manual
Section 7: Command reference
707B-901-01 Rev. A / August 2010
7-167
scriptVar.source
This attribute holds the source code of a user script.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Attribute (R)
No
Not applicable
Not saved
Not applicable
Usage
code = scriptVar.source
scriptVar
The name of the variable that references the script that contains the source code
code
The body of the script
Details
The
loadscript
or
loadandrunscript
and
endscript
keywords are not included in the source code.
Example
print(test1.source)
Gets source code for a script named
test1
.
Also see
(on page 7-164)
settime()
This function sets the real-time clock (sets current time of the system).
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function Yes
Usage
result = settime(time)
result = settime(hour, minute, second)
result
A string representing the current time of day
time
The time in seconds since January 1, 1970 UTC. Time to be passed in as:
os.time({year = year, month = month, day = day, hour = hour,
min = min, sec = sec})
hour
The desired hour from 00 to 23
minute
The desired minute from 00 to 59
second
The desired second from 00 to 59
year
A full year (2006 or later)
month
The desired month from 1 to 12
day
The desired day from 1 to 31