• 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
Scripting TCP/IP
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scripting TCP/IP


  • Subject: Scripting TCP/IP
  • From: Craig Nansen <email@hidden>
  • Date: Sun, 7 Oct 2001 09:49:51 -0500

I am quite new to AppleScript, but have been trying to search the archives and follow some of the discussions to pick up ideas that can help save us time.

In our school district we have around 3,000 computers, mainly Macs, on a network connecting over 20 buildings.

Due to some changes in our network, we need to change settings in TCP/IP (domain addresses and names) and we need to set TCP/IP to always be on. An AppleScript that can do this for us will save a lot of time.

I found the script in the AppleScript Guidebook: (We actually need to set it to false, but I wanted to post the exact script as I found it.)

set transaction_ID to ""
try
tell application "Network Setup Scripting"
open database
set transaction_ID to begin transaction
set loads on demand of transport options "TCP/IP Globals" to true
end transaction
close database
end tell
on error error_message
try
tell application "Network Setup Scripting"
if the transaction_ID is not "" then abort transaction
close database
end tell
end try
end try

but this produces an error when compiling:
"An on can't go after this identifier"
This comes from the "set loads on demand" statement.

Yet in the explanation in the AppleScript Guidebook there is a paragraph on "Loads on Demand"
The loads on demand property relates to the checkbox in the TCP/IP options dialog accessed by clicking the Options button in the TCP/IP Configurations Window. This parameter controls whether TCP/IP stays open or is loaded only when needed.


  • Prev by Date: Re: Where is Script Menu?
  • Next by Date: Internet Explorer file extension
  • Previous by thread: Desktop Picture questions for OS X
  • Next by thread: Internet Explorer file extension
  • Index(es):
    • Date
    • Thread