Re: Closing TCP/IP control panel and BUG in 'path to'
Re: Closing TCP/IP control panel and BUG in 'path to'
- Subject: Re: Closing TCP/IP control panel and BUG in 'path to'
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 10 May 2002 08:33:14 -0700
On 5/10/02 8:14 AM, "Ken McGregor" <email@hidden> wrote:
>
I have written a quick script that changes the Name Server Address
>
in the TCP/IP control panel using Sandis additions.
>
>
The script closes the TCP/IP panel after the change.
>
>
The script works fine on my mac but when moved to another mac
>
it requires user interaction as the script requests for the path to
>
"TCP/IP".
>
I need the script to run unattended if possible.
>
>
Therefore I would like to know where this path info is kept.(Or any other
>
work around) I expected it to be in the applescript prefs but that does
>
not seem to be the case.
>
>
Thanks in advance
AppleScript prefs? Why so?
Check out the AppleScript Dictionary for Standard Additions in Scripting
Additions folder, 'path to' command.
set tcpPanel to (((path to control panels) as string) & "TCP/IP") as alias
WARNING: Before Nigel comes in to say that it actually works more
efficiently (i.e. save a millionth of a second) by writing that as
set tcpPanel to ((path to control panels as string) & "TCP/IP") as alias
without parentheses before 'as string', DON'T do it in OS 9.2.2, AS 1.8.2b3
and I don't know how many other AS versions (1.7 on perhaps)?
path to control panels as string
without the parentheses CRASHES Script Editor and all other script editors.
I just found this out the hard way.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.