I took your advice and changed the list to read "98", "ME", etc.

Here's the deal.  I have a small executable and several dcr files.  When
I open the dcr file from my executable I get "98" detected.  If I create
a projector instead of a dialer I get "ME" detected.  If I call the htm
file I get "ME" detected.  So why when I call the dcr movie from the exe
do I get "98"? This happens on all the alternative lingo I have tried
including using Buddy API.

Any one have an idea?  

Thanks
Liz

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Howdy-Tzi
> Sent: Wednesday, June 25, 2003 2:00 PM
> To: [EMAIL PROTECTED]
> Subject: Re: <lingo-l> baVersion( "os" )
> 
> 
> On Wednesday, Jun 25, 2003, at 13:11 America/Chicago, Liz wrote:
> 
> > Code below.
> 
> Your code's too complex. All you need is this:
> 
> 
>    on exitFrame me
>      myOS = the environment.osVersion
>      go to frame myOS
>    end
> 
> 
> Part of the problem is you're using 'contains', and it's likely that 
> since the osVersion will *always* contain "Windows" on a Win system, 
> your code is kicking out of the loop when it hits "Windows 98", which 
> is the first item in your OS list and which does in fact contain the 
> word "Windows".
> 
> Don't bother with the test unless you want to guard against the 
> possibility of there being some OS or other you can't recognize. In 
> that case you can use contains, but in a different way:
> 
> 
>    on exitFrame me
>      lOSenIKnow = [ "95", "98", "ME", "NT", "2000" ]
>      myOS = the environment.osVersion
>      repeat with nItem in lOSenIKnow
>        if myOS contains lOSenIKnow.nItem then
>          go to frame myOS
>        else
>          ALERT "I don't recognize this OS..."
>        end if
>      end repeat
>    end
> 
> 
> myOS doesn't need a string conversion; it's already a string.
> 
> 
> Warren Ockrassa | President,  nightwares LLC  [EMAIL PROTECTED]
>   nightwares LLC | Consulting  Programming     
> http://www.nightwares.com/
>        Developer | Structor, a 
> presentation development/programming tool
>    Info and demo | http://www.nightwares.com/structor/
>           Author | Director 8.5 Shockwave Studio: A 
> Beginner's Guide Chapter samples | 
> http://www.nightwares.com/director_beginners_g> uide/
> 
> [To 
> remove yourself from this list, or to change to 
> digest mode, go to http://www.penworks.com/lingo-l.cgi  To 
> post messages to the list, email [EMAIL PROTECTED]  
> (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
> learning and helping with programming Lingo.  Thanks!]
> 

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to