Network Setup Scripting problem
Network Setup Scripting problem
- Subject: Network Setup Scripting problem
- From: Greg Ray <email@hidden>
- Date: Thu, 25 Jul 2002 14:49:39 -0400
I am unable to retreive the status of the active Remote Access configuration. The code given below (modelled on Apple Guidebook examples) should work but does not. The status call just results in an interminable beach-ball spin.
Can someone clue me in here? 1) I would like to learn what is wrong with the code. 2) That aside, I am really just trying to get a working routine that will test for a live internet connection. So, if there is some other good way of doing this, I am all ears.
Environment in which the problem is occuring: OS 9.1, Applescript 1.8.3 (or 1.6), Network Scripting Addition 1.2 (or 1.3.1).
Thanks much,
Greg R.
------------------------------------------------------------------------
set config_name to <some valid config name>
tell application "Network Setup Scripting"
open database
set current_status to the status of (Remote Access configuration config_name)
set curr_activity to the activity of the current_status
close database
end tell
------------------------------------------------------------------------
Lest you think I am just plugging in an invalid config name, the following code doesn't work either, and craps out again on the status call:
------------------------------------------------------------------------
tell application "Network Setup Scripting"
open database
set the current_config to every Remote Access configuration whose active is true
set the current_config to item 1 of the current_config
set the current_config to the name of the current_config
set current_status to the status of (Remote Access configuration current_config)
close database
end tell
------------------------------------------------------------------------
_______________________________________________
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.