Photoshop Javascript and Applescript

I am trying to get applescript to run the “export Layers to Files.jsx” javascript. I have seen some things about running a javascript with applescript but cannot get this one to work.

I have seen where the code was:

tell application “Adobe Photoshop CS4”
do javascript (path to javascript) with arguments []
end tell

But I can not figure out what the arguments would be for this to run. I have been able to get it to start running with the above code leaving out the " with arguments’ part, but it will not run completely.

Can anyone help, Please. Or is this just not possible?

Thanks,