Copy link to clipboard
Copied
Question 1)
I'm trying to run a stable socket server within After Effects. Could someone tell me if running the SocketServer in ExtendScript Toolkit and sending messages via BridgeTalk is the best way to do this? I was looking into the InDesign Server platform, and I'm curious if that might make a more stable SocketServer platform to send messages to AE via the BridgeTalk messaging API. Any thoughts?
Question 2)
Is there anyway to access the BridgeTalk messaging API or get an SDK to allow me to send messages with a different application, such as Luxology Modo, or node.js as a socket server? My good people of Adobe, might you provide us access to the BridgeTalk API? I'll send brownies.
Question 3)
Is running a script (such as the aforementioned socket server) from within ExtendScript IDE a bad idea? Seems like it is. I'm not sure how to launch it automatically (similar to the way you can put scripts in the Application startup items folder).
Thanks so much!!!!
-F
Copy link to clipboard
Copied
Hello F,
I am the engineer who currently knows the most about BridgeTalk.
In regards to your questions: If you want to communicate with other Adobe products on the same machine then BridgeTalk would probably be my first choice. If you have to communicate over the network, or with non-Adobe products, or AIR applications then using your own socket server might be a better choice. You cannot use BridgeTalk with applications that haven't integrated the BridgeTalk client library (in other words Luxology Modo and node.js won't work).
You'll find a lot of information about the Socket and BridgeTalk classes in the JavaScript Tools Guide CS4:
http://www.adobe.com/devnet/scripting/pdfs/javascript_tools_guide_cs4.pdf
Running scripts from the ExtendScript IDE is a great idea if you are developing your script and if you need to debug your code. You have to make sure that the target popup shows the application that the script is intended to run. Most Adobe applications allow you to hook up client scripts into the menu. For example, if you place an ExtendScript script "MyScript.js" in C:\Program Files\Adobe\Adobe Photoshop CS4\Presets\Scripts on Windows Photoshop will create a menu item under File/Scripts/MyScript. I am not sure whether After Effects supports the same feature. In general I would not add code to startup scripts, because startup scripts are being executed each time a script is being processed.
Best regards,
- Bernd
Copy link to clipboard
Copied
Hi, does anyone has ever used a script to retrieve an RSS feed with socket.
Here is the code I use :
//--
var webConnect = new Socket;
var response = new String;
var rss = "";
if(webConnect.open("api.meteorologic.net:80","UTF-8")){
webConnect.write("GET /forecarss?p=Paris");
response = webConnect.read(9999999);
response = response.toString();
var xmlStart = response.indexOf("<?xml");
var xmlString = response.substring(xmlStart, response.length);
try
{
rss = new XML(xmlString);
}catch(e){ alert('error parsing XML with error \r ' + e.toString()) }
alert(rss);
}
//--
but the display "alert(rss);" is blank while the web page contains much information : http://api.meteorologic.net/forecarss?p=Paris
thanks for any help..
Michel