not very nice but works for mail.

tell application "Finder"
        set x to path to applications folder
        set y to every application file in x whose name contains "mail"
        if number of items of y = 1 then
                -- just variations of the format        
                set z to y as alias
                set z1 to z as text
                set z2 to POSIX path of z
        else
                -- tell me to scratch my head   
        end if
end tell

if you want to do it for apps that are in subfolders of the application
folder like iWork etc. you have to adapt it further. If you dont know where
to look for an app this script is out of luck.
regards
Bernd


On 31/03/09 7:49 PM, "Jim Sims" <[email protected]> wrote:

> On OS X the applescript:
> 
> tell application "System Events" to (get path to application "Mail")
> 
> will get the path to an application (in this case "Mail.app").
> However, it seems to need to open that app before it can get the path.
> 
> Is there an applescript or shell script that will tell me the path to
> an application without opening it first?
> 
> I do understand that on can use answer file - but I'd like an
> alternative.
> 
> sims
> 
> [email protected]
> Skype:   sims.jim
> iChat:   techietours
> ______________________
> Opportunity by Design
> 
> 
> 
> 
> _______________________________________________
> use-revolution mailing list
> [email protected]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution



-- 
View this message in context: 
http://www.nabble.com/obtaining-application-paths-tp22800903p22803062.html
Sent from the Revolution - User mailing list archive at Nabble.com.

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to