On my PHP pages, I have data from a MySQL database that supplies path/filename info for some images. I would like to be able to click a button and open those images in PhotoShop. Every other solution I’ve tried stinks, so I thought I would give Applescript a try (never used it before). So I created an app in AS and wrote the Photoshop part. I have PHP set to call the Applescript app when a button is depressed. That part was easy and it’s working super.
What is a problem is getting the data from the PHP page to the Applescript. I thought I could do it in Javascript but I realized, reading here, that AS does not support the “do Javascript” statement for Firefox. Alas. I searched and found an older thread on here that suggests writing a plug-in to do this, but that is totally beyond my capabilities. Is there any other alternative for what seems like a fairly simple task?
Thanks in advance for any help or guidance.
Elizabeth
Applescript Editor 2.3
Photoshop 12.0.1
tell application "Adobe Photoshop CS5"
activate
set photo1 to "Macintosh HD:Applications:MAMP:htdocs:Collection:3:nav.gif"
set photo2 to "Macintosh HD:Applications:MAMP:htdocs:Collection:3:pic1.jpg"
set photo3 to "Macintosh HD:Applications:MAMP:htdocs:Collection:3:pic3.jpg"
try
open file photo1
open file photo2
open file photo3
on error
display dialog "Couldn't locate all documents"
end try
end tell
AppleScript: Applescript 2.1.2
Browser: Firefox 3.6.12
Operating System: Mac OS X (10.6)