Re: Strange raw code problem
Re: Strange raw code problem
- Subject: Re: Strange raw code problem
- From: Charles Arthur <email@hidden>
- Date: Mon, 19 Nov 2001 12:48:43 +0000
On Sun, 18 Nov 2001 09:47:12 +0100, "Serge Belleudy-d'Espinose"
<email@hidden> wrote:
>
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 SE/Smile add () 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"
That doesn't look to me like a string. xActivity would be a concatenated
list on that basis unless you've got some silent coercion going on from
list to string. Have you checked "class of xActivity"?
Why not
set xActivity to (state of xStatus) as string
..
>
which works most of the time but not always; from time to time, state
>
will be coerced to
>
>
<<constant ****RAs1>>
A misfiring coercion perhaps...
..
>
Of course there
>
is the fact that idle is also the reserved word for the handler
shouldn't matter since you aren't calling the handler, you're querying
within a tell block, right? So it sends the query to the application in the
tell block first.
>
I wish someone has an explanation/better idea.
Try 10.1 :-) You don't get the debugging of Smile from Classic but you can
run that separately. And network scripting is a lot easier. Well, easier.
Charles
----------------------------
http://www.ukclimbing.com : 1000+ British crags, 350+ British climbing
walls - searchable by distance and anything else you care to think of -
with weather forecasts for every one, plus maps, articles, news and
features. Plus Britain's busiest climbing discussion boards. And there's
even a cool shop attached.
_____________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp