Skip to main content
May 14, 2012
Question

How to Http Post from ExtendScript ?

  • May 14, 2012
  • 2 replies
  • 3527 views

Hello,

One   suggestion from the forum suggested using  System.CallSystem ( http://forums.adobe .... this works,   but the script stops until the browser is closed.Is there a html library that works with ExtendScript ?

I tried XMLHttpRequest  :

var request = new XMLHttpRequest();  <-- I get a error 'XMLHttpRequest does not have a constructor'  What am I missing ?

Has anyone tried to use extendables.jsx ?

Thanks, Peter

This topic has been closed for replies.

2 replies

Lazlo_Hollyfeld
Inspiring
August 12, 2013

I've tried to use Extendables with AE, but the original author's code breaks on CS5.  However, there is a forked repo where it won't break.  You can pick it up here:

https://github.com/percentcer/Extendables

I've been able to use the GET method to access an external, remote, PHP script, but have been unable to use POST.  I realize it's been a year since your post, but were you able to access a script via POST?

Participating Frequently
May 15, 2012

Here is an example of what I use to display a web page (to run directly from After Effects) :

var win = new Window ("dialog");

var winBrowserCmd = "C:/Program Files/Internet Explorer/iexplore.exe";

var macBrowserCmdStart = "osascript -e 'open location \"";

var macBrowserCmdEnd = "\"'";

var BtnURL = win.add("button", undefined, "Check for update");

BtnURL.onClick = LinkToURL;

win.add ("button", undefined, "Close", {name: "ok"});

function LinkToURL()

        {

            var URL = "http://www.google.fr/"; // your web page

           

            if ($.os.indexOf("Windows") != -1)

                system.callSystem(winBrowserCmd + " " + URL);

            else

                system.callSystem(macBrowserCmdStart + URL + macBrowserCmdEnd);

           

        }

win.show ();