repeating print every 10 minutes in illustrator

50 Views Asked by At

I have some small printers which need to print every 10 or 15 minutes to decrease damage of printers. so, I need a script (jsx or vbs) to send a command to illustrator to print every 10 minutes. Is that possible? If so, How?

I tried some basic js codes but some functions doesnot work

// Set the time interval in milliseconds
var interval = 600000;

// Define the function to print the document
function printDocument() {
    var doc = app.activeDocument;
    doc.print(false, false, null);
}

// Call the function at the specified interval
while (true) {
    printDocument();
    app.sleep(interval);
}
0

There are 0 best solutions below