Ok i’m a newbie, so forgive me if i don’t make sense…
I’ve managed ot wirte an applescript that copys an application in its folder (from a CD) to the applications folder. but i wish to make it produce an alert if the folder alredy exists. I’ve used the ‘exists’ command, but how do i make applescript alert the user that the folder already exists?
I also wish to make an alias of the application, that has been copied to the HD, on the desktop. copying an alias that was on te CD doesn’t work as the aliases path is wrong and doesn’t link to the correct file on the HD.
--> copy app to Applications folder, then...
set theApp to alias ((path to applications folder as text) & "foo:foo.app")
tell application "Finder" to make new alias at desktop to theApp
If it doesn’t, sorry, I can’t access to a OS 9 machine anymore :oops:
so that it always goes to the users start-up disk no matter what they have named it?
at the moment i am doing "Macintosh HD:Applications (Mac OS 9)… etc but i can’t find a way of replacing Macintosh HD with a reference to the start up disk.
“path to applications folder” will return the applications folder of the current system, so it will include the correct disk name (that is the applications folder in the startup disk). Run this in a script-editor window and watch the result:
path to applications folder
--> this one returns here:
--> alias "solomon burke:Applications:"
To obtain the startup disk…
path to startup disk
Just take a look to the entry “path to” in the dictionary of Standard Additions.