ClipAI - Knowledge Base (FAQ)
< All topics

How to work with ClipAI through another script or program?

Let's figure out how to integrate ClipAI into another script/program. First of all, this article will be useful to developers of their scripts/programs. (!) If you are not a developer, or do not use ProjectMaker or similar software, or at least are not an advanced PC user, this article is unlikely to help you: in this case write to us, and we will help you realize what you need.


Launch and number of executions

To automate the launch of ClipAI, just right-click on the line with ClipAI -> “Create bat file”:

A window will appear with a fairly large selection of automations. For example, if you need to add one execution and start the job, set the following parameters:

When you click “Ok,” the bat file will be saved, and when launched, ClipAI will immediately launch with the addition of 1 execution. This file can be installed after executing any script or program (for example, a third-party data parser), if it is supported in third-party software.

If you have a self-written script on Zennoposter, it can be simply added like this:

If you have a self-written program on C#, you can use this code by first opening the resulting bat file in a text editor and replacing "1234567-1234-1234-1234-123456789012"in the proposed code for taskId, which will be in 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 path to the TasksRunner file from the Zennoposter folder):


import subprocess
import time

# Replace this line with the path to your executable file TasksRunner.exe. Remember that there should be two backslashes in the path, not just one: one backslash is reserved for escape sequences.
zenno_poster_current_path = "C:\\Path\\To\\ZennoPoster\\TasksRunner.exe"

# Run a task with a given identifier (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)

# Adding an attempt to a task with a given identifier (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, consider: do you really need to change the parameters? For example, if you want to add article titles to the input, you can work with the input file ClipAI. If you need to choose a specific site to publish on, you can use the site parameter. For linking There are also convenient options.

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

1. Right-click on the line with the script -> “Settings”.
2. Set the settings to which you will change the current parameters of the ClipAI during operation.
3. In the lower left corner of the settings, select “Export”, save the settings to a file.
4. Repeat steps 2-3 as many times as different settings variations you need.
5. Click “Create bat file” as indicated at the beginning of this article, but additionally install the required settings file in “Input settings” -> “Import”.