Problems with Network Setup Scripting...continued
Problems with Network Setup Scripting...continued
- Subject: Problems with Network Setup Scripting...continued
- From: Simon Brown <email@hidden>
- Date: Sun, 09 Feb 2003 00:38:58 +0000
I thought I'd overcome my problems with Network Setup Scripting since
installing the version from 9.2.1, but I'm having a problem with it...
The handler below that queries NSS usually returns values shown just below
-- e.g. {connected, 620, 48000}
-- or {idle, 0, 0}
but occasionally, when the computer has been running for an extended period
it suddently starts returning values like:
--{"+constant ****RAs3;", 4096, 49333}
Which seems like what Rachel (Gnarlodious) was saying about the
ra_ppp_status OSAX that I was using as a workaround before I installed NSS
from 9.2.1. i.e. that it times out after a while and requires a reboot to
rectify it?
Has anyone else experienced this?
on Get_RA_State()
-- returns state, seconds connected, connection speed
-- e.g. {connected, 620, 48000}
-- or {idle, 0, 0}
try
tell application "Network Setup Scripting"
-- open the Networking Database
open database
-- get the name of the active configuration (as a one item list)
set RA_ActiveConfig to every Remote Access configuration whose
active is true
set RA_ActiveConfig to item 1 of RA_ActiveConfig
set RA_ActiveConfigName to the name of Remote Access
configuration RA_ActiveConfig
set current_RA_Status to (the Remote Access status of Remote
Access configuration RA_ActiveConfig)
set RA_State to the activity of current_RA_Status
set RA_TimeConnected to the time connected of current_RA_Status
set RA_ConnectSpeed to (the first word of speed of
current_RA_Status) as integer
close database
end tell
on error errMsg number errNum
display dialog errMsg & return & return & errNum
try
tell application "Network Setup Scripting"
close database
end tell
end try
return {"Error", 0, 0}
end try
return {RA_State as string, RA_TimeConnected, RA_ConnectSpeed}
end Get_RA_State
Any help/advice much appreciated
--
Simon
--------------
--
Simon
--------------
_______________________________________________
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.