ZennoLab

Automate everything

User Tools

Site Tools


Sidebar

Translations of this page:

en:progs_run

Own code

This action allows to extend program functionality using JavaScript or C# code.

Javascript

Your code on Javascript can be executed in two ways:

1. Locally - script will be run in local environment (independently from browser). This way you can process variables, numbers, strings, i.e. process any data.

2. On current page - script will be run in browser (its current instance). This way you can interact with page elements, process DOM-objects on page.

Example:

This code will return cookie from current webpage in browser.

JavaScript Tester

JavaScript tester is the feature that allows to check execution of your script. Tester generates additional code to insert your script into action block.

C# code

You can also use C# code to perform some tasks in ZennoPoster.

Note that C# code does not support ZennoPoster internal macros, so, if you want to process project variables, you should put them into code this way:

project.Variables["var1"].Value;

where var1 is variable name.

To access .Net classes from code you should load GAC links and add Using directives.

Run program

This action allows to run external programs, whether it is usual program or application with command line interface, such as:

  • WinRAR
  • cmd
  • imagemagick
  • tesseract ocr

and many other.

en/progs_run.txt · Last modified: 2015/10/19 16:28 by vladz