Skip to main content
Known Participant
December 9, 2020
Question

How to Script run another one over the internet ?

  • December 9, 2020
  • 3 replies
  • 365 views

Can someone help me?

I'm trying to make a script run another one over the internet ... Would that be possible?

I've created this so far =

function init() {
    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.src = 'https://pastebin.com/raw/JbHhPmuG';
    document.body.appendChild(script);
    var scriptToLoad = new File ('script.src')
}



This topic has been closed for replies.

3 replies

Kukurykus
Legend
December 9, 2020

Read how to do it in capter 6: 'External Communication Tools' of JAVASCRIPT TOOLS GUIDE CC.

Known Participant
December 9, 2020

Understand..

In this case, I would like to execute an External Javascript inside my javascript ...


Pensei que seria possível.

Porque se eu puder fazer isso, eu poderia disponibilizar meu javascript para as pessoas e atualizá-lo sempre que eu quiser ...

obrigado pela ajuda: D

Known Participant
December 9, 2020

Understand..

In this case, I would like to execute an External Javascript inside my javascript ...


I thought it would be possible.

Because if I can do that, I could make my javascript available to people and update it whenever I want ...

thanks for the help: D

Known Participant
December 9, 2020

I think I see, perhaps. You don't actually want to execute a script across the internet, at all? You want to READ a script from the internet, and execute it on the local machine? As a way of distributing the script?


Yes, exactly.

I will execute one locally and inside it will have the other that will be on the internet ...

on some website.

Example;

example.jsx ---> this one I will execute inside my Photoshop

and inside it there would be some function that executes another script that is on the internet.

Legend
December 9, 2020

Scripting across the Internet is how the internet works. But normally at one end is a web server. Photoshop can't be used on a web server. So... perhaps you can describe what you see happening at the two "ends" of the conversation, and we can help unravel what us possible and how hard it is.