Re: newbie /(current time) ..
Re: newbie /(current time) ..
- Subject: Re: newbie /(current time) ..
- From: jitse <email@hidden>
- Date: Thu, 25 Jan 2001 22:43:09 +0100
ok! now with "end if" ..but still when I try to run the script
the apple scripteditor does not accept " time": syntax wrong -expected ","
or "}" but found property.
.. so I tried " (current date)" but in the event protocol window I get:
----------------
tell current application
current date
--> date "donderdag, 25 januari 2001 22:29:30 Uhr"
end tell
tell application "Network Setup Scripting"
open database
begin transaction
--> -1215 ... the number is different each time I run the script
abort transaction
close database
end tell
-----------------
the script so far:
set theTime to {currentdate}
tell application "Network Setup Scripting"
try
open database
begin transaction
if theTime comes after 9 * hours and theTime ,
comes before 17 * hours then
set active of TCPIP v4 configuration "ISP1" to true
set active of Remote Access configuration "ISP1" to true
else
set active of TCPIP v4 configuration "ISP2" to true
set active of Remote Access configuration "ISP2" to true
end if
end transaction
close database
on error
abort transaction
close database
end try
end tell