{"id":19293381,"url":"https://github.com/marianpekar/bootmate","last_synced_at":"2026-06-18T11:31:53.270Z","repository":{"id":160132680,"uuid":"634599850","full_name":"marianpekar/bootmate","owner":"marianpekar","description":"A lightweight automation tool for MS Windows","archived":false,"fork":false,"pushed_at":"2024-03-23T12:43:57.000Z","size":86,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-24T00:22:38.112Z","etag":null,"topics":["automation","cplusplus","cpp","winapi","windows-tool","winuser"],"latest_commit_sha":null,"homepage":"","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/marianpekar.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}},"created_at":"2023-04-30T16:48:21.000Z","updated_at":"2024-05-04T22:50:27.000Z","dependencies_parsed_at":"2024-03-23T13:44:09.049Z","dependency_job_id":"38e56a89-4ce1-4992-830e-39a5cc10c3fe","html_url":"https://github.com/marianpekar/bootmate","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/marianpekar/bootmate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marianpekar%2Fbootmate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marianpekar%2Fbootmate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marianpekar%2Fbootmate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marianpekar%2Fbootmate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marianpekar","download_url":"https://codeload.github.com/marianpekar/bootmate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marianpekar%2Fbootmate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34489028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["automation","cplusplus","cpp","winapi","windows-tool","winuser"],"created_at":"2024-11-09T22:34:47.688Z","updated_at":"2026-06-18T11:31:53.251Z","avatar_url":"https://github.com/marianpekar.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bootmate\n\nBootmate is a lightweight automation tool that accepts via command line arguments a recipe file, path to an executable with any command line arguments for this executable and then it runs this executable and performs actions from the recipe.\n\nOr you can run Bootmate with just a path to a recipe. In this case, no executable will be run and Bootmate starts performing the actions immediately.\n\nYou can also run executables from a recipe itself, using a `run` command (see [All Recipe Commands](#all-recipe-commands)).\n\n```\nBootmate.exe [recipe] ([executable]) ([command-line arguments])\n```\n\nA recipe file might look like this:\n```\nvar:name Bootmate\nvar:half_second 500\n\nloop:2\n  write:Knock...\n  press:enter\nend\n\nwrite:Who's there?\nsleep:${$half_second*2}\npress:enter\nwrite:It's $name!\nsleep:$half_second\npress:enter\nwrite:Boot, who?\nname:Boot Mate\nsleep:$half_second\npress:enter\nwrite:$name!\n\nhold:ctrl\npress:s\nrelease:ctrl\nsleep:1200\nwrite:kkjk.txt\npress:enter\n```\nWhen you run this recipe on a notepad.exe, like this\n```\nBootmate.exe example.recipe \"C:\\Windows\\notepad.exe\"\n```\nthe process will start the Notepad, type the following text and save it as `kkjk.txt`\n```\nKnock...\nKnock...\nWho's there?\nIt's Bootmate!\nBoot, who?\nBoot Mate!\n````\nIn the example you can see a usage of `loop`, `write`, `sleep`, `press`, `hold`, and `release` commands, but also `var`iables and [Expressions](#expressions). There are also commands to drive a mouse, like in this example:\n```\nset cursor:512 400\nvar:size 100\nmove cursor:$size 0\nmove cursor:0 $size\nmove cursor:${-$size} 0\nmove cursor:0 ${-$size}\nclick:left\n```\nThis first sets the cursor position to x 512 and y 400 pixels, then moves it along a square-shaped path clockwise and simulates a LMB click.\n\nYou can also move cursor to a position of the top-left corner of a window with a given title using `point cursor` command.\n```\npoint cursor:Calculator\n```\nThis will move cursor to the top-left corner of a Calculator window, assuming the window with such title is present, otherwise nothing happens.\n\nOn top of that, Bootmate is configurable by `bootmate.ini` you can but don't have to provide, and both ini and recipe file support single-line comments prefixed with `;`. If you need a semicolon you need to escape it with a backtick.\n\n```\nvar:name Bootname ;this is a comment\nname:Bootname`;this is NOT a comment\n```\nIn this^ example, the value of the `name` variable has been re-assigned from `Bootname` to `Bootname;this is NOT a comment`\n\n## All Recipe Commands\nEach command has to be placed on a separate line. When a command accepts values, values are separated from the command with a `:`. Multiple values are separated from themselves by space.\n| Syntax | Description | Example |\n| - | - | - |\n| write:{text} | Simply types a given text. Default delay between characters is 1 millisecond (see Bootmate.ini). | ```write:hello``` |\n| press:{key*} | Makes a single key press. | ```press:enter``` |\n| hold:{key*} | Holds a key until `release` is called or program ends. | ```hold:shift``` |\n| release:{key*} | Releases a key. If the key is not currently held, nothing happens. | ```release:shift``` |\n| set cursor:{x} {y} | Move cursor an absolute position (position [0,0] is the top left corner of the screen). | ```set cursor:512 400``` |\n| move cursor:{x} {y} | Move cursor to a relative position. | ```move cursor:0 10``` |\n| point cursor:{windowTitle} | Move cursor to a position of the top-left corner of a window with a given title. | ```point cursor:Calculator``` |\n| click:{left/middle/right} | Performs a left, middle, or right mouse button click. | ```click:right``` |\n| hold mouse:{left/middle/right} | Holds a mouse button until `release mouse` is called or program ends. | ```hold mouse:left``` |\n| release mouse:{left/middle/right} | Releases a mouse button. If the button is not currently held, nothing happens. | ```release mouse:left``` |\n| scroll:{amount} | Rolls a mouse wheel. A positive number rolls up (forward), a negative rolls down (backward). | ```scroll:-120``` |\n| sleep:{ms} | Waits a given time in milliseconds. | ```sleep:500``` |\n| loop:{n} ... end | Repeats commands between `loop` and `end` n-times. | ```loop:10``` \u003cbr/\u003e...\u003cbr/\u003e ```end``` |\n| run:{exe} ({args}) | Runs an executable, optionally with cmd line args. **If your path contains spaces or '`:`' wrap the path with `\"`** | ```run:\"C:\\Program Files\\My Precious App\\MPA.exe\"``` |\n| var:{name} ({value}) ** | Declares a variable. You can but don't have to initialize it. The default value is an empty string. | ```var:name Bootmate``` |\n| {name}:{value} ** | Re-assign a variable. Value can contain any character, including a space (semicolon needs to be escaped with a `` ` `` as everywhere where you don't want to mark the rest of a line as a comment). | ```name:Boot Mate``` |\n\n*) See the [List of Keys](#list-of-keys)\n\n**) Use variables in values of any command by prefixing its name with a `$` (e.g. `$name`)\n\n## List of Keys\nSome virtual keys have two options (the second option is in brackets)\n```\nreturn (enter)\nshift\nctrl (control)\nalt,\nbackspace\ndelete\ntab\nescape (esc)\nspace\nleft\nright\nup\ndown\nhome\nend\npageup\npagedown\ninsert\nf1 — f12\nnumpad0 — numpad9\nmultiply (*)\nadd (+)\nsubtract (-)\ndecimal (.)\ndivide (/)\n0 — 9\na — z\n```\n\n ## Built-in Variables\nBootmates has a couple of built-in variables. Here's a list of them:\n\n| Variable | Description |\n| --- | --- |\n| `$weekday` | The current day of the week from 1 to 7, where 1 is Sunday and 7 is Saturday. |\n| `$day` | The current day of the month |\n| `$month` | The current month |\n| `$year` | The current year |\n| `$hour` | The current hour in UTC, if you need to adjust to your timezone, you can do that with an expression like this `${$hour+2}` |\n| `$minute` | The current minute |\n| `$second` | The current second |\n\n## Expressions\n\nYou can also use basic mathematical expressions (supported operators are `()`, `%`, `^`, `*`, `/`, `+`, and `-`) in any value, an expression has to start with `${` and ends with `}`. Here are some examples:\n\n```\nwrite:${2+4*2} is smaller than ${(2+4)*2} and ${(2+4)*-2} is a negative number.\nwrite:Two to the power of four is ${2^4}.\n```\nWrites `10 is smaller than 12 and -12 is a negative number. Two to the power of four is 16.`\n\n```\nvar:pi 3.141592\nvar:tau ${$pi*2}\nwrite:$tau is twice as large as $pi\n```\nWrites `6.283184 is twice as large as 3.141592`\n```\nvar:n ${2+4*2} \nn:${$n/2}\nloop:${$n+1}\n  write:${$n*2} divided by 2 is $n\n  press:enter\nend\n```\n Writes 6 lines of `10 divided by 2 is 5`\n\n ## Branching\n \nYou can compare numbers and expressions using common comparison* and logical** operators and branch your recipe with `if`, `else if`, and `else` statements. **Notice the whole block has to end with `end if`**.\n\n|*) Comparison Operators | |\n|---|---|\n|`==`| equal |\n|`!=`| not equal |\n|`\u003c`| less than |\n|`\u003e`| greater than |\n|`\u003c=`| less than or equal |\n|`=\u003e`| greater than or equal |\n\n|**) Logical Operators | |\n|---|---|\n|`\u0026\u0026`| and |\n|`\\|\\|`| or |\n\nHere are a few examples:\n\n ```\nif:${1+1 \u003c 3}\n    sleep:5000\nend if\nwrite:Five seconds have passed\n ``` \nBecause the expression `${1+1 \u003c 3}` evaluates to `true`, program waits 5 seconds and then writes `Five seconds have passed`.\n\n ```\nvar:n 1\nif:${$n != 1}\n    sleep:5000\nelse\n    write:One equals one\nend if\n ``` \n Immediately writes `One equals one`\n\n ```\nif:${$weekday == 1}\n    write:Sunday\nelse if:${$weekday == 2}\n    write:Monday\nelse if:${$weekday == 3}\n    write:Tuesday\nelse if:${$weekday == 4}\n    write:Wednesday\nelse if:${$weekday == 5}\n   write:Thursday\nelse if:${$weekday == 6}\n    write:Friday\nelse\n    write:Saturday\nend if\n ```\n Writes the name of the current weekday (`$weekday` is a built-in variable)\n\n```\nif:${$weekday == 1 || $weekday == 7}\n    write:It's weekend!\nelse\n    write:Weekend starts in ${7 - $weekday} day(s)\nend if\n```\nWrites `It's weekend!` on Sunday and Saturday, otherwise writes how many days remain until Saturday, including the present day.\n\n## Bootmate.ini\nOptional `bootmate.ini` currently supports the following global configuration pairs.\n\n| Key | Description | Default Value |\n| - | - | - |\n| bNoMultipleInstances | Prevents Bootmate from running an executable if such application is running already | 1 (true)\n| bFindWindowByTitle | From some applications Bootmate fails to get a window handle.\u003cbr/\u003eYou can switch it to try to find a window by its title instead.\u003cbr/\u003eThis can be also useful when you run Bootmate without passing an executable. | 0 (false) |\n| sWindowTitle | A window title relevant to `bFindWindowByTitle` | - |\n| iDefaultDelay | A delay between each command in milliseconds | 1 |\n| iDefaultWriteDelay | A delay between each character in `write` command in milliseconds | 1 |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarianpekar%2Fbootmate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarianpekar%2Fbootmate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarianpekar%2Fbootmate/lists"}