Re: ensuring that "run script" runs the script in OS X ?
Re: ensuring that "run script" runs the script in OS X ?
- Subject: Re: ensuring that "run script" runs the script in OS X ?
- From: Bill Christens-Barry <email@hidden>
- Date: Tue, 18 Jan 2005 15:15:11 -0500
From Gnarlodious:
Date: Tue, 18 Jan 2005 12:16:38 -0700
From: Gnarlodious <email@hidden>
Subject: Re: ensuring that "run script" runs the script in OS X ?
To: Applescript <email@hidden>
Message-ID: <BE12AEA6.65496%email@hidden>
Content-Type: text/plain; charset="US-ASCII"
Entity Bill Christens-Barry spoke thus:
My basic question is: how can I write a "run script" command that
ensures that
the script it runs runs in OS X AppleScript and not in Classic
AppleScript? Is
there syntax to designate which version things run in? I didn't see any
obvious answers in the list archive
system attribute "sysv"
You will have to run this on a 9.2.2 machine to get the number, there's a
way to deduce it mathematically but I forget what it is. 10.3.6 returns 4150
Here's the rest of it:
set thous to hexVers div 4096
set hexVers to hexVers mod 4096
set huns to hexVers div 256
set hexVers to hexVers mod 256
set tens to hexVers div 16
set ones to hexVers mod 16
set osVers to (thous as string) & huns & "." & tens & "." & ones
I forget who to give credit for this, please excuse.
-- Gnarlie
This is helpful, but how do I use this number to enforce running the
script in OS X? Remember, the "run script" command is being issued in
the Classic environment.
My naive hope was that I could include it as an argument to the "run
script" command, along the lines of:
run script file theScript using OSVersion osVers
or something. Unfortunately, the Standard Additions dictionary
doesn't seem to allow for this syntax. Perhaps an equivalent problem
is to be able to ensure that the OS X version of AppleScript gets
activated whenever *any* AppleScript commands are used in the Classic
environment. Any thoughts?
Thanks.
Bill Christens-Barry
--
-----------------------
Bill Christens-Barry, PhD
Equipoise Imaging, LLC
email@hidden
410-750-6656
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden