How to Script run another one over the internet ?

Community Beginner ,
Dec 09, 2020

Copy link to clipboard

Copied

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')
}



TOPICS
Actions and scripting, How to

Views

67

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How to Script run another one over the internet ?

Community Beginner ,
Dec 09, 2020

Copy link to clipboard

Copied

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')
}



TOPICS
Actions and scripting, How to

Views

68

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 09, 2020 0
Most Valuable Participant ,
Dec 09, 2020

Copy link to clipboard

Copied

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. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 09, 2020 0
Community Beginner ,
Dec 09, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 09, 2020 0
Community Beginner ,
Dec 09, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 09, 2020 0
Most Valuable Participant ,
Dec 09, 2020

Copy link to clipboard

Copied

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?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 09, 2020 1
Community Beginner ,
Dec 09, 2020

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 09, 2020 0
Most Valuable Participant ,
Dec 09, 2020

Copy link to clipboard

Copied

You not be able to do that.  User Operating system security would prevent you starting code on user machine.  You would need to install some service on every user machine you script can connect to to be able to update your code on users machines.  You would also need to book keep all machine your code is installed on and track the maintenance on each and have procedure to handle machines that may not connect and those that do not  want you to automatically update their machine.   The First thing I do with Adobe software is to make sure I have disabled Adobe's  Automatic Update.  Don't assume if users want to use something you develop that they want you to maintain their machine. 

 

My Scripts have a help button the help is on my web server and is updated by me. Help includes links for a download  that include fixes and additions and these are listed.  My stuff is free and I'm lazy I only make complete package download available. There are no separate update for each fix and add on.  IMO its the users responsibility to install an updated package if the need it. If they have no  Problem with what is installed do they the need an update.  If they have a problem fixes are listen in the help, additions are also listed in the help.  Users can make up the own mind if they want and updated package. If they do the link is provided.

JJMack

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 09, 2020 1
Adobe Community Professional ,
Dec 09, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 09, 2020 0