• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: newbie /(current time) ..
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: newbie /(current time) ..
      • From: Pier Kuipers <email@hidden>
References: 
 >Re: newbie /(current time) .. (From: Mr Tea <email@hidden>)

  • Prev by Date: Re: What has happened to Network Setup Scripting?
  • Next by Date: Re: QuarkXpress find and replace with variables (new question)
  • Previous by thread: Re: newbie /(current time) ..
  • Next by thread: Re: newbie /(current time) ..
  • Index(es):
    • Date
    • Thread