• 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: Can't get TCPIP v4 configuration PPP server
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: Can't get TCPIP v4 configuration PPP server


  • Subject: re: Can't get TCPIP v4 configuration PPP server
  • From: "Joe Troha" <email@hidden>
  • Date: Tue, 6 Aug 2002 17:06:09 +1000
  • Thread-topic: re: Can't get TCPIP v4 configuration PPP server

Hi all,

Im just starting out with applescript and I must say im very impressed with its capabilities, what a powerful scripting technology. However like all learning curves, I have come across an error which I just cannot solve. Ive searched the list archives and script information web sites with no success, so im hoping someone can help me within this list.

I am simply attempting to: create and set a configuration for a TCP/IP setting within MAC OS 9.2.2
Below is the event log error im receiving followed by the actual source script I am developing:


event log --------

tell application "Network Setup Scripting"
open database
begin transaction
--> -21227
exists TCPIP v4 configuration "CF_modemInternal"
--> false
make new TCPIP v4 configuration "CF_modemInternal" with properties {user mode:advanced, connecting via:PPP, configuration method:PPP server}
make new name server address 1 of TCPIP v4 configuration PPP server with data "000.000.00.0"
abort transaction
close database
end tell
tell current application
path to +constant afdregfp; as text
--> "Gforce:apps:util:Apple Extras:AppleScript:Script Editor"
display dialog "Network Setup Scripting got an error: Can't get TCPIP v4 configuration PPP server." buttons {"OK"} default button 1
--> {button returned:"OK"}
end tell

event log --------




applescript source -------

try
tell application "Network Setup Scripting"

set this_user_mode to advanced
set config_name to "CF_modemInternal"
set this_connection_method to PPP
set this_config to PPP server
set name_server_address_one to "000.000.00.0"
set name_server_address_two to "000.000.00.0"

set the transaction_ID to ""

open database
set the transaction_ID to begin transaction

if not (exists TCPIP v4 configuration config_name) then
make new TCPIP v4 configuration config_name with properties ,
{user mode:this_user_mode ,
, connecting via:this_connection_method ,
, configuration method:this_config}


tell TCPIP v4 configuration this_config
make new name server address 1 with data name_server_address_one
make new name server address 2 with data name_server_address_two
end tell


set active of TCPIP v4 configuration config_name to true
end transaction

error "Creative Factory )2002

The new "" & the config_name & "" settings for both Appletalk and TCP/IP has been successfully installed and activated for modem use."

else
set active of TCPIP v4 configuration config_name to true

error "Creative Factory )2002

The "" & the config_name & "" settings for both Appletalk and TCP/IP has been activated for modem use."

end if
close database
end tell

on error display_message
try
tell application "Network Setup Scripting"
if the transaction_ID is not "" then abort transaction
close database
end tell
end try
tell application (path to frontmost application as text)
display dialog display_message buttons {"OK"} default button 1
end tell
end try

applescript source -------

Id greatly appreciate if someone can pick up on my error.

thanks in advance.



Joe
Creative Factory
http://www.creativefactory.com.au
_______________________________________________
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.

  • Prev by Date: RE: Regarding Power macG4 (DSP/Dual Processors)
  • Next by Date: Re: OT: Eskimo words for snow (Re: what's a "froplet"?)
  • Previous by thread: RE: Filemaker text Formatting
  • Next by thread: Wait... Wait...
  • Index(es):
    • Date
    • Thread