{"id":16199918,"url":"https://github.com/agateau/sinta","last_synced_at":"2025-08-24T09:35:46.925Z","repository":{"id":66380984,"uuid":"215487977","full_name":"agateau/sinta","owner":"agateau","description":"Script In the App. A tool to run JavaScript code in any Qt application","archived":false,"fork":false,"pushed_at":"2019-10-25T07:48:59.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T19:49:49.439Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agateau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"agateau","ko_fi":"agateau","liberapay":"agateau","custom":"https://agateau.com/support/"}},"created_at":"2019-10-16T07:44:45.000Z","updated_at":"2021-04-13T19:00:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"994b01dc-cfab-4d8a-821e-7c37adb77b51","html_url":"https://github.com/agateau/sinta","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agateau%2Fsinta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agateau%2Fsinta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agateau%2Fsinta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agateau%2Fsinta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agateau","download_url":"https://codeload.github.com/agateau/sinta/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247703697,"owners_count":20982285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T09:28:42.167Z","updated_at":"2025-04-07T17:47:00.670Z","avatar_url":"https://github.com/agateau.png","language":"C++","funding_links":["https://github.com/sponsors/agateau","https://ko-fi.com/agateau","https://liberapay.com/agateau","https://agateau.com/support/"],"categories":[],"sub_categories":[],"readme":"# Sinta - Script In The App\n\n## Introduction\n\nSinta is a tool to inject and run JavaScript code in a Qt application. It can\nbe useful to automate tasks such as taking screenshots or doing some functional\ntesting.\n\nDisclaimer: this is in a very early stage and not usable yet!\n\n## Usage\n\nTo run a script inside an application you can use the `sinta` executable.\n\nThe job of the `sinta` executable is to:\n\n- Start your application and inject the `libsinta` dynamic library inside it\n- Tell libsinta to run your script\n\nThe source code contains a test application in the `testapp` directory. This\napplication lets you pick a font and opens a popup showing a message written\nusing this font.\n\nBy running sinta on it like this:\n\n    sinta \u003cpath/to/src/sinta/testapp/test.js\u003e \u003cpath/to/build/dir/testapp/testapp\u003e\n\nYou can see the application opening, then the test script saves a screenshot of\nthe main window, then go through the 10 first fonts and for each one it opens\nthe popup and saves a screenshot of it.  When it's done it quits the\napplication.\n\n## Writing scripts\n\nScripts are written in JavaScript and evaluated by [QJSEngine][].\n\n### The `tools` object\n\nSinta exposes a `tools` object which provides useful functions to interact with\nyour application.\n\nIn particular, `tools.activeWindow()` returns the active window and\n`tools.findChild()` lets you find a child of any object by its `objectName`.\n\nFor now, you can look at [sinta/Tools.h](sinta/Tools.h) documentation for details.\n\n### Misc\n\nThe `console` object is available, so you can make use of `console.log()`.\n\n[QJSEngine]: https://doc.qt.io/qt-5/qjsengine.html\n\n## Building\n\nSinta depends on Qt 5 and CMake. To build it:\n\n    mkdir build\n    cd build\n    cmake ..\n    make\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagateau%2Fsinta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagateau%2Fsinta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagateau%2Fsinta/lists"}