Skip to main content

How do I use ClipAI from another script or program?

Let’s see how to integrate ClipAI into another script or program. This article is mainly for developers of their own scripts and programs. (!) If you are not a developer, don’t use ProjectMaker or similar software, or are not even an advanced PC user, this article is unlikely to help you. In that case, just write to us, and we’ll help you set up what you need.


Launching and the number of executions

To automate launching ClipAI, right-click the ClipAI row -> “Create bat file”:

A window will open with quite a wide choice of automation options. For example, to add one execution and start the task, set the following:

Clicking “OK” saves a bat file; running it immediately starts ClipAI and adds 1 execution. You can set this file to run after another script or program finishes (for example, a third-party data parser), if that software supports it.

If you have your own script in ZennoPoster, you can simply add it like this:

If you have your own C# program, you can use this code: first open the resulting bat file in a text editor, then replace “1234567-1234-1234-1234-123456789012” in the code below with the taskId from your bat file:

string zennoPosterCurrentPath = Environment.GetEnvironmentVariable("ZennoPosterCurrentPath");
string taskId = "1234567-1234-1234-1234-123456789012";
string tasksRunnerExePath = System.IO.Path.Combine(zennoPosterCurrentPath, "TasksRunner.exe");
// StartTask
Process.Start(tasksRunnerExePath, "-o StartTask -ids " + taskId);

// Wait for 1 second
Thread.Sleep(1000);

// AddTries
Process.Start(tasksRunnerExePath, "-o AddTries 1 -ids " + taskId);

Python code (don’t forget to replace the ids and the path to TasksRunner in the ZennoPoster folder):


import subprocess
import time

# Replace this with the path to your TasksRunner.exe. Use double backslashes in the path, not single ones: a single backslash starts an escape sequence.
zenno_poster_current_path = "C:\\Path\\To\\ZennoPoster\\TasksRunner.exe"

# Start the task with the given ID (replace ids with yours from the bat file)
subprocess.run([zenno_poster_current_path, "-o", "StartTask", "-ids", "1234567-1234-1234-1234-123456789012"])

# Wait 1 second
time.sleep(1)

# Add one try to the task with the given ID (replace ids with yours from the bat file)
subprocess.run([zenno_poster_current_path, "-o", "AddTries", "1", "-ids", "1234567-1234-1234-1234-123456789012"])

Changing settings before starting

(!) First, think it over: do you really need to change the settings? For example, if you want to add article titles to the input, you can work with ClipAI’s input file. If you need to choose a specific site to publish to, you can use the site parameter. For interlinking, there are handy parameters too.

But if you definitely need to change settings automatically, do the following:

1. Right-click the script row -> “Settings”.
2. Choose the settings that ClipAI should switch to during operation.
3. In the lower-left corner of the settings, choose “Export” and save the settings to a file.
4. Repeat steps 2-3 for each settings variant you need.
5. Click “Create bat file” as described at the beginning of this article, and also select the settings file you need under “Input settings” -> “Import”.

Still have questions? Contact @a1exmurz or use the online chat (button in the bottom-right corner). We will answer any questions at any time. We can also set up ClipAI on your computer (via remote access) tailored to your needs. It's free!

ru_RURussian