Welcome to MacForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Applescript version problem - newbie

 
   Macintosh computer (Home) -> Apple Scripts RSS
Next:  Burning a CD/DVD  
Author Message
Invader Zim

External


Since: Jul 04, 2004
Posts: 2



(Msg. 1) Posted: Wed Mar 14, 2007 5:41 am
Post subject: Applescript version problem - newbie
Archived from groups: alt>comp>lang>applescript (more info?)

I'm a newbie with little AppleScript experience, though I'm not
completely new to programming in general. I just installed Tiger OS X
from a factory Apple DVD. I did just a basic install. I then installed
several other programs and everything seems to be running fine, but I
ran a simple program that evidently uses AppleScript and it returned
the message that it needs AppleScript version 1.9.0 and that I am
running verison 1.1.0.

This didn't seem right so I searched around for version info and found
the following script (between the dashed lines) in the book:

AppleScript in a Nutshell
By Bruce W. Perry
O'Reilly

-----------------
set ASversion to version as string -- initialize ASversion to a string

set ASversion to (characters 1 thru 3 of ASversion as string) as real

(* coerce ASversion to a real number like 1.4 *)

if ASversion is greater than or equal to 1.4 then (* test whether the
version

value is 1.4 *)

display dialog "Good, you're running at least AppleScript 1.4" (*
give the

user some feedback with a dialog box *)

else

display dialog "You're running AppleScript " & ASversion

end if
-----------------

I ran this in the Script Editor and sure enough it returned:

"You're running AppleScript 1.1"

I tried the same thing for my older Jaguar 10.3.8 OS X on one of my
internal drives and it returned "Good, you're running at least
AppleScript 1.4"

Anyone got any ideas why I would only get the value 1.1 for Tiger? I
did the OS installation on a new external 250 GB firewire drive from
OWC computing. I didn't reformat the drive before installing OS X, but
all it had on it was shareware in dmg format that was shipped with it
and I can't see how that would hurt. I inserted the install disk to see
if I could just reinstall AppleScript, but I didn't find the option.
Does AppleScript have problems running on an external firewire drive?

Thanks for any help.

--
Invader Zim

 >> Stay informed about: Applescript version problem - newbie 
Back to top
Login to vote
Patrick Stadelmann

External


Since: Nov 12, 2003
Posts: 242



(Msg. 2) Posted: Wed Mar 14, 2007 10:06 am
Post subject: Re: Applescript version problem - newbie [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <140320070546260541%zim@archon.net>,
Invader Zim <zim.DeleteThis@archon.net> wrote:

> I'm a newbie with little AppleScript experience, though I'm not
> completely new to programming in general. I just installed Tiger OS X
> from a factory Apple DVD. I did just a basic install. I then installed
> several other programs and everything seems to be running fine, but I
> ran a simple program that evidently uses AppleScript and it returned
> the message that it needs AppleScript version 1.9.0 and that I am
> running verison 1.1.0.

Tiger contains AppleScript version 1.10.x, not 1.1.0 which was the
version in Mac OS 8 ! Your program is buggy, and so is the script you
posted. Try changing the first line to :

set ASversion to "1.10.1"

you'll see that it reports it as 1.1.

Patrick
--
Patrick Stadelmann <Patrick.Stadelmann.DeleteThis@unine.ch>

 >> Stay informed about: Applescript version problem - newbie 
Back to top
Login to vote
Michelle Steiner

External


Since: Jul 15, 2003
Posts: 4215



(Msg. 3) Posted: Wed Mar 14, 2007 10:10 am
Post subject: Re: Applescript version problem - newbie [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

Back to top
Login to vote
Invader Zim

External


Since: Jul 04, 2004
Posts: 2



(Msg. 4) Posted: Thu Mar 15, 2007 1:54 am
Post subject: Re: Applescript version problem - newbie [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <michelle-F70DE5.10102514032007.DeleteThis@news.east.cox.net>, Michelle
Steiner <michelle.DeleteThis@michelle.org> wrote:

> In article <140320070546260541%zim@archon.net>,
> Invader Zim <zim.DeleteThis@archon.net> wrote:
>
> > Anyone got any ideas why I would only get the value 1.1 for Tiger?
>
> Because the script is broken; it considers only the first three
> characters of the string, which is "1.1"; the actual version is "1.10.7".
>
> Remove this line completely:
>
> set ASversion to (characters 1 thru 3 of ASversion as string) as real
>
> Change this line:
>
> if ASversion is greater than or equal to 1.4 then
>
> to this:
>
> if ASversion is greater than or equal to "1.4" then


Thanks for both responses. You are right. I made the changes suggested
above and when I run it in the Script Editor, it returns the value
1.10.6, which is also the value I see if I select "About AppleScript
Editor" while running AppleScript Editor. I suppose the shareware
program I was trying to run must have made a similar mistake since it
would run ok under my Jaguar OS which has AppleScript 1.9.1.

Thanks again for your help.

--
Invader Zim
 >> Stay informed about: Applescript version problem - newbie 
Back to top
Login to vote
Display posts from previous:   
   Macintosh computer (Home) -> Apple Scripts All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]