Strange raw code problem
Strange raw code problem
- Subject: Strange raw code problem
- From: "Serge Belleudy-d'Espinose" <email@hidden>
- Date: Fri, 16 Nov 2001 21:09:13 +0100
Hi all,
I'm trying to script Network Setup Scripting with raw codes. One line says:
set xActivity to state of xStatus
where state is a constant with values idle/ connecting/ connected/
disconnecting/ unknown. If I check it against idle,
if xActivity is not idle
upon checking Smile adds () around idle
if xActivity is not (idle)
and on run NSS says something like "NSS doesn't understand the idle command."
So I tried to coerce the constant to a string and check against a string:
set xActivity to "" & state of xStatus
if xActivity is not "idle"
which works most of the time but not always; from time to time, state
will be coerced to
<<constant ****RAs1>>
wich is the raw code for idle, but if I type the code itself in the
script it is immediately translated to idle, and then the
parenthesis. So my last trick was to check xActivity against both
values:
if xActivity is not in {"idle", "<<constant ****RAs1>>"}
and it seems to always work, but it's really awkward. I wish someone
has an explanation/better idea.
Thanks,
Serge
--
\\//\//\// Serge Belleudy-d'Espinose Institut Jacques Monod
// // //
http://www.ijm.jussieu.fr/ Universite Paris VII - Jussieu
//\//\//\\