Path of mounted DMG

Hi

I am new to Applescript. I want to create a patch/hotfix that copies new files from downloadable DMG to an installation location. For this I am packaging an applescript along with new application files together in a DMG. The user is expected to open the DMG, run the script. Problem is I am not able get location of files in dmg in the script. The script’s working directory is root directory. How do I get location of files in DMG?

Sanjay

First of all: welcome to MacScripter

Second of all: You’re probably talking about OS X, so please post next time into OS X forum

Third of all: If the Image is mounted (e.g. named myImage), the HFS path is “myImage:”, the POSIX path “/Volumes/myImage/”

I tested this and it works in Leopard Saved as an App bundle in a DMG:

tell application "Finder"
	set theCont to container of (path to me)
	set theC to name of every file of theCont as list
end tell
log theC
set {TID, text item delimiters} to {text item delimiters, space & return}
set this_it to text items of theC as string
set text item delimiters to TID
display dialog "Items in " & theCont & return & return & this_it buttons {"OK"} default button 1

Thanks That was useful. I could solve the issue with your suggestion.