Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'AppleScript formatting question' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
AppleScript formatting question
Authored by: markuswarren on May 03, '07 11:17:25AM
The problem is due to the backslashes' in the "do shell script line" not being escaped, thus when it's compiled it gets an error. The line in question should read:

 do shell script "hdiutil attach -mountpoint /Developer/ADC\\ Reference\\ Library/ /Developer/DevLibrary.dmg"
The full script code, with the amended line would be:

on opening folder this_folder
	tell application "System Events"
		if file "/Developer/ADC Reference Library/index.html" exists then
			-- display dialog "it exists!" --used for testing
		else
			do shell script "hdiutil attach -mountpoint /Developer/ADC\\ Reference\\ Library/ /Developer/DevLibrary.dmg"
		end if
	end tell
end opening folder


[ Reply to This | # ]