• 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
Re: Versions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Versions


  • Subject: Re: Versions
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 24 Mar 2011 11:04:25 -0500

On Mar 24, 2011, at 10:36 AM, Fleisher, Ken wrote:

I have a script that is running on multiple machines, but some machines return an error while others run correctly for certain commands. (Usually having to do with getting bounds of a layer in photoshop—some machines need the command “bounds of layerref as list” and others require me to omit the “as list”. The results are returned as follows:

{{0,0,100,100}}
{0,0,100,100}

I can check that all machines have the same exact version of Photoshop, but I’ve lost track of Applescript over the years. On OS 10.5.8, what do I need to check for to find if the machines are running the same version of applescript?

Versions work this way ...

tell application "System Events" to version --> 1.3.4
tell application "Finder" to version --> 10.6.8
tell application "Safari" to version --> 5.0.4
version --> 2.1.2 ... AppleScript version
tell application "Finder"
tell me to version --> 2.1.2 ... AppleScript version
end tell

But, you will probably need to compare the version with something, so you will need to get the version as an integer. Like this ...

on getASVersion()
set AppleScript's text item delimiters to {"."}
(text items of (version as text)) & {"0", "0", "0"}
1000000 * (item 1 of the result) + 1000 * (item 2 of the result) + (item 3 of the result)
return the result
end getASVersion

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Versions
      • From: "Fleisher, Ken" <email@hidden>
References: 
 >Versions (From: "Fleisher, Ken" <email@hidden>)

  • Prev by Date: Re: Versions
  • Next by Date: Re: Versions
  • Previous by thread: Re: Versions
  • Next by thread: Re: Versions
  • Index(es):
    • Date
    • Thread