• 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: Toggling Appletalk active/inactive with Applescript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toggling Appletalk active/inactive with Applescript?


  • Subject: Re: Toggling Appletalk active/inactive with Applescript?
  • From: Nigel Garvey <email@hidden>
  • Date: Wed, 25 Jul 2001 15:46:41 +0100

Jan Pieter Kunst wrote on Mon, 23 Jul 2001 22:17:49 +0200:

>Hello all,
>
>Is it possible to set Appletalk to active or inactive with Applescript? This
>(the idea for which came from O'Reilly's "Applescript in a nutshell", which
>every scripter should buy IMHO) :
>
>
>
>tell application "Netwerkconfiguratie-scripting"
> try
> open database
> get AppleTalk active of transport options 2
> --> true
>
> set AppleTalk active of transport options 2 to false
> close database
> on error errmesg
> close database
> set msg to errmesg
> end try
>end tell
>
>display dialog msg
>
>
>
>... results in a dialog: "Configuration locked" (or "secured"; translating
>from Dutch).

Changes to configuration and option settings have to be done as part of a
'transaction'. Also, it may be wiser to specify 'AppleTalk options 1'
rather than 'transport options 2', in case the current AppleTalk option
is ever *not* the second transport option.

tell application "Network Setup Scripting"
try
open database
AppleTalk active of first AppleTalk options whose active is true
--> true

try
begin transaction
set AppleTalk active of first AppleTalk options whose active is
true to false
end transaction
on error
abort transaction
end try

close database
on error errmesg
close database
set msg to errmesg
end try
end tell

NG


  • Prev by Date: RE: good book on quark express
  • Next by Date: Re: Can you put a background pict on an applescript ?
  • Previous by thread: Re: Toggling Appletalk active/inactive with Applescript?
  • Next by thread: RE: [Rant] Will mount volume EVER work the way it is supposed
  • Index(es):
    • Date
    • Thread