You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload images and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact contact us.
Photoshop ScriptingLearning and sharing for all platforms
I am writing a script to read a CSV file and place text in layers, etc.. it works using a local datafile, but as everything we do is database or XML managed, I'd like to call a script to return the data.. but I can't get it to work over http. I am trying to us this:
var dbText = new File('http://www.myDomain.com/data.php');
dbText.open ('r');
I dont know what scripting language u use. On Windows pc I'd say, go for the wget application. This is a command line tool that lets you download files from internet. Then just bind it all together with vbscript. (done this with xls files and it worked great). Or you might try using javascript, I think you can use the xmlhttp library (the new tool to use:-)= buzz about ajax is about this library). Don't know if this works on mac as well. Thy searching google for ajax or xmlhttp. There's a few good guides on how to use it.(returns text or xml)
The PSJS implementation does not support the 'new File("http://whatever.com")' syntax. You will need to write a script that you invoke via 'File.execute()'. Taking this route lets you choose from a bunch of different options, including stuff like perl, python, lynx, and wget. I'm using the cygwin environment, so perl would be a natural choice for me.