To add a new module, create a new directory (with the above structure) in the modules/ directory. The essential files and directories are those that are marked red in the diagram; the other files are used to extend the functionality of the module.
The action code can be written in any text editor, for example in Notepad ++
If your text editor has a syntax highlighter, it is best to choose JavaScript syntax highlighter. The action files have to be saved in UTF-8 without BOM.
...
...
List of the software methods
T.log("Начало работы"); resp = T.makeRequest("GET", T.get("url")); body = T.encode(resp.body, resp.charset); T.log("Конец работы");
Список методов:
T.stop() T.done() T.undone() T.lock() T.unlock() T.sleep(long milliseconds) T.enable(String flagName) T.disable(String flagName) byte[] T.decode(String string) byte[] T.decode(String string, String charset) String T.encode(byte[] bytes) String T.encode(byte[] bytes, String charset) String T.getId() int T.getRowIndex() T.clearGlobalObject() Object T.getGlobal(...) Object T.getGlobalObject(String key) T.setGlobal(...) T.setGlobalObject(String key, Object object) String T.get(...) String T.getRowValue(String key) T.set(...) T.setRowValue(String key, String value) T.err(...) T.makeError(String error) T.log(...) T.addLog(Object log) T.addRow() T.addRow(String[] values) String T.getProxy() String T.getNextProxy() T.setProxy(String proxyString) T.clearCookies() T.deleteCookiesByUrl(String url) T.deleteCookieByUrlAndName(String url, String name) String T.getCookie(...) String T.getCookieValue(String url, String name) T.setCookie(String url, String name, String value) T.clearSession() Object[] T.getSession() T.setSession(Object[] session) byte[] T.read(...) byte[] T.readFromFile(String fileName) T.write(...) T.writeToFile(String fileName, byte[] fileBytes) T.writeToFile(String fileName, byte[] fileBytes, String fileMode) T.createDir(String fileName) boolean T.deleteDir(String fileName) boolean T.deleteFile(String fileName) Object T.getRandom(...) Object T.getRandomValue(Object[] values) String T.getRegExp(...) String T.getRegExpValue(String source, String re) String T.getRegExpValue(String source, String re, String format) String T.getCaptcha(...) String T.getCaptchaValue(byte[] captcha) String T.getCaptchaValue(byte[] captcha, String[] params) String T.makeURL(String urlBase, String[][] params) String T.getHeaderReferer() T.setHeaderReferer(String header) String T.getHeaderUseragent() T.setHeaderUseragent(String header) Map<String, Object> T.makeRequest(String method, String url) Map<String, Object> T.makeRequest(String method, String url, String[][] headers) Map<String, Object> T.makeRequest(String method, String url, String[][] headers, String[][] body) Map<String, Object> T.makeRequest(String method, String url, String[][] headers, String[][] body, String cahrset)