• 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: Remote Access and Network Setup Scripting problems under OS 9.1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Remote Access and Network Setup Scripting problems under OS 9.1


  • Subject: Re: Remote Access and Network Setup Scripting problems under OS 9.1
  • From: Kai <email@hidden>
  • Date: Tue, 11 Feb 2003 12:06:32 +0000

on Mon, 10 Feb 2003 22:15:25 +0000, Simon Brown <email@hidden>
wrote:

> I could do a workaround if I knew the "un-interpreted" values of all the
> possible values returned by querying the "activity" property of the status
> record.
>
> i.e. connected = +constant ****RAs3;
>
> but what are the other states?
>
> I'm assuming (from the order of the constants in the dictionary entry):
> activity idle/connecting/connected/disconnecting/unknown [r/o]
>
> they should be:
>
> idle = +constant ****RAs1;
> connecting = +constant ****RAs2;
> connected = +constant ****RAs3; --- OK, I know this one already
> disconnecting = +constant ****RAs4;

Correct, Simon. (So far, so good.)

> unknown = +constant ****RAs5; --- Not sure if this one would follow the
> pattern

Not quite.

> Could you or anyone in the group confirm these.

(<< = opt-\, >> = shift-opt-\)

-- <<constant ****RAs1>> --> <<constant RAsaRAs1>> --> idle
-- <<constant ****RAs2>> --> <<constant RAsaRAs2>>" --> connecting
-- <<constant ****RAs3>> --> <<constant RAsaRAs3>>" --> connected
-- <<constant ****RAs4>> --> <<constant RAsaRAs4>>" --> disconnecting
-- <<constant otgp????>> --> unknown

> Also:
> 1) Are these constants only meaningful within a tell NSS block?

Yes (RAs --> Remote Access status. To test this, try compiling any of the
above codes inside and outside a tell NSS block)

> 2) Does anyone have a listing of these and other 'raw' constant values?

To save Emmanuel jumping in here, I believe Smile (free) can give you raw
codes. Check out:

http://www.satimage-software.com/en/softx.html#smile

To just get a constant, try something like this:

===========================

to getCode from x
try
x as number
on error e number -1700
set {tid, o, c} to {text item delimiters, [NO-BREAK]
ASCII character 199, ASCII character 200}
set text item delimiters to o
set {e, text item delimiters} to {e's text item -1, c}
set {e, text item delimiters} to {e's text item 1, tid}
return o & e & c
end try
end getCode

tell application "Network Setup Scripting" to getCode of me from idle
--> "<<constant RAsaRAs1>>"

===========================

--
Kai
_______________________________________________
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: Saving a document in Safari
  • Next by Date: Re: Remote Access and Network Setup Scripting problems under OS 9.1 (and 9.2.1)
  • Previous by thread: Re: Unreliable Mail.app AppleScript Rules
  • Next by thread: on "do shell script"
  • Index(es):
    • Date
    • Thread