View Single Post
  #1023  
Old 08.12.2019, 12:18
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by SirJohnny View Post
how can I see the output of my script ? In python, you would call print.
Is alert the only way ?
You can also log the output to JD session logs using:
Code:
log(myObject[]);/*Log to stderr and to JDownloader Log Files*/

or, write to a file using:
Code:
writeFile(myString/*filepath*/, myString/*myText*/, myBoolean/*append*/);/*Write a text file*/
/* Example: */writeFile(JD_HOME+"/log.txt",JSON.stringify(this)+"\r\n",true);

You can append the debug string to a variable and view them in a single alert box after all the items in the array are processed.
Reply With Quote