Re: newbie /(current time)
Re: newbie /(current time)
- Subject: Re: newbie /(current time)
- From: "Marc K. Myers" <email@hidden>
- Date: Thu, 25 Jan 2001 14:55:04 -0500
- Organization: [very little]
jitse wrote:
>
Date: Thu, 25 Jan 2001 18:01:44 +0100
>
Subject: newbie /(current time) ..
>
From: jitse <email@hidden>
>
To: <email@hidden>
>
>
in the following script (which I assembled with the help of some helpful
>
mebers of this list:) the time operation does not seem to work:
>
>
set theTime to {current time}
>
>
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 transaction
>
close database
>
on error
>
abort transaction
>
close database
>
end try
>
end tell
Try changing the first line of your script from
set theTime to {current time}
to
set theTime to (current time)
You want theTime to be a value of class date. The way you've got it,
it's a value of class list, containing a value of class date.
I'm assuming that "(current time)" works on your system. With AS 1.1.2,
which I'm using, you would have to say "(current date)" and parse out
the time of day as time from 00:00:00 of the current date.
I don't know Network Setup Scripting, so I don't know if there's
anything wrong with the rest of the script.
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[1/25/01 2:52:27 PM]