• 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
Strange raw code problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
//\//\//\\


  • Prev by Date: Mac OS X: AppleScript incorrectly decompiling tell blocks
  • Next by Date: Re: Modify Data Fork
  • Previous by thread: Re: Mac OS X: AppleScript incorrectly decompiling tell blocks
  • Next by thread: Strange raw code problem
  • Index(es):
    • Date
    • Thread