Remote Access scripting problem (can't get status of active configuration)
Remote Access scripting problem (can't get status of active configuration)
- Subject: Remote Access scripting problem (can't get status of active configuration)
- From: Simon Brown <email@hidden>
- Date: Tue, 04 Feb 2003 23:27:27 +0000
I'm struggling to control Remote Access 4.0 in OS 9.1. Specifically I can't
get the syntax right for getting the status of the active Remote Access
connection. The script below is adapted from one of the examples in the
Applescript Guidebook and does work, but the result doesn't mean anything to
me. I was expecting a string with a value of "Idle" or "connecting" but can
only get the result shown below the script (and that is only by coercing the
value to a record). I've tried the example "connect with monitoring" from
the "Network Setup Scripting" module of the guidebook which connects but
returns an error of "applescript event timed out" when it tries to monitor
the status of the connection progress.
Any help would be much appreciated.
Script:
try
tell application "Network Setup Scripting"
open database
-- get the active configuration as a single item list
set RA_ActiveConfig to every Remote Access configuration whose
active is true
set RA_Props to the properties of item 1 of RA_ActiveConfig
set RA_ConfigName to the name of item 1 of RA_ActiveConfig
set current_RA_Status to (the Remote Access status of item 1 of
RA_ActiveConfig) as record
log the current_RA_Status
close database
end tell
tell application (path to frontmost application as text)
display dialog "Finished call to Network Setup Scripting without
error" buttons {"OK"} default button 1
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
end try
return current_RA_Status
--{+class form;:+constant ****prop;, +class want;:property, +class
seld;:PPPStatusParam, from:item 1 of {Remote Access configuration "xyz" of
application "Network Setup Scripting"}}
--
Simon Brown
--------------
_______________________________________________
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.