AppleScript

Discussion in 'Mac Programming' started by jegadhu84, Apr 28, 2011.

  1. jegadhu84 macrumors newbie

    Joined:
    Apr 28, 2011
    #1
    Hi everyone,

    Please tell me the way to findout the version of an application using AppleScript. :confused:
     
  2. Dalton63841 macrumors 65816

    Dalton63841

    Joined:
    Nov 27, 2010
    Location:
    SEMO, USA
    #2
    If you want to know the version of an app all you need to do is click on the title of the app in the menubar and click About.
     
  3. jegadhu84 thread starter macrumors newbie

    Joined:
    Apr 28, 2011
    #3
    Thanks.

    Hi Dalton,

    Very good suggestion. I need to know the version using AppleScript. Please read the Thread once again.
     
  4. Dalton63841 macrumors 65816

    Dalton63841

    Joined:
    Nov 27, 2010
    Location:
    SEMO, USA
    #4
    Code:
    do shell script "osascript -e 'version of application "Application"'"
    Something to this affect should work. You need to tweak the quotation marks obviously. Replace "Application" with the app you want to find the version.
     
  5. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #5
    I don't know much about AppleScript, but why escape from AppleScript into the shell just to enter AppleScript again.

    Is the above not the equivalent of:
    Code:
    version of application "Application"
    
     
  6. jegadhu84 thread starter macrumors newbie

    Joined:
    Apr 28, 2011
    #6
    Thanks

    Hi,

    Its working fine.

    Code:
     
    tell application "Silverlight Preferences" to get the version
    
    Thanks dalton
     
  7. Dalton63841 macrumors 65816

    Dalton63841

    Joined:
    Nov 27, 2010
    Location:
    SEMO, USA
    #7
    Would you look at that. You got it. And yea I knew the code I put didn't make any sense for some reason. Im pretty tired at this point...
     
  8. jegadhu84 thread starter macrumors newbie

    Joined:
    Apr 28, 2011
    #8
    Yes, Its equivalent.

    Code:
    tell application "Finder" to get the version of application "Silverlight Preferences"
    
    The above is as like what you said.
     

Share This Page