{"id":22678323,"url":"https://github.com/evilc/sequencesender","last_synced_at":"2026-01-08T07:13:21.104Z","repository":{"id":71118379,"uuid":"184088924","full_name":"evilC/SequenceSender","owner":"evilC","description":"A library for AutoHotkey to make it easy to send (optionally repeating) sequences of characters","archived":false,"fork":false,"pushed_at":"2020-08-12T13:10:35.000Z","size":83,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-04T13:44:37.460Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"AutoHotkey","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evilC.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2019-04-29T14:42:04.000Z","updated_at":"2025-01-28T08:10:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"6119f9a2-6e43-4c38-b974-e361a102d010","html_url":"https://github.com/evilC/SequenceSender","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilC%2FSequenceSender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilC%2FSequenceSender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilC%2FSequenceSender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilC%2FSequenceSender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evilC","download_url":"https://codeload.github.com/evilC/SequenceSender/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246187242,"owners_count":20737462,"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-12-09T18:14:46.789Z","updated_at":"2026-01-08T07:13:21.059Z","avatar_url":"https://github.com/evilC.png","language":"AutoHotkey","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SequenceSender\nA library for AutoHotkey to make it easy to send (optionally repeating) sequences of characters  \n\n## [Support / Discussion thread on the AHK forums](https://www.autohotkey.com/boards/viewtopic.php?f=6\u0026t=64124)\n\n## Objectives\nThe purpose of this library is to allow users to easily send sequences of characters, with timing (eg waiting between keys)  \n* All \"Asynchronous\" code.  \nNo Loops or Sleeps.  \nThis is to minimize interference with your other code. AHK is not a multi-threaded language!    \n* When stopping, can abort mid-sequence  \nSaves you checking between each send or sleep if we want to stop  \n* Supports Random sleep times  \nGive it a min and max amount of time to sleep, and it will pick a random value  \n* Specify what to send using identical syntax to AHK's `Send` command  \nWith extra `[Tokens]` to handle Sleeping etc  \n* Minimal processing during play-time.  \nAll string manipulation is done at load-time.  \n* Extensible  \nNew [Token Handlers](https://github.com/evilC/SequenceSender/blob/master/Lib/DefaultTokens.ahk) can be added to allow custom operations\n\n## Usage\n### Overview\n1. Download the library using the green \"Clone or Download\" button above\n1. Unzip the contents to a folder of your choice\n1. Create a new script in the same folder as `Simple Example.ahk`\n1. Include the library: `#include SequenceSender.ahk`  \n1. Create a new SequenceSender object: `ss := new SequenceSender()`  \n1. Optionally set options, eg `ss.ResetOnStart(false)`\n1. Load a SequenceString: `ss.Load(\"^a^c[Sleep, 100]!{Tab}^v\")`  \n1. Start sending using `ss.Start()`, stop using `ss.Stop()` or Toggle using `ss.Toggle()`    \n\n### SequenceStrings\nA SequenceString is a string of text which describes to SequenceSender what needs to be sent and the timings that need to be used  \nSendStrings can comprise of two types of text:  \n1. SendString  \nThis tells SequenceSender to send some keys.  \n    1. It is in normal AHK `Send` format, eg `^a` or `^{a}` to send Ctrl-A  \n    1. When sending, any modifiers plus **one** key are sent at a time  \n      eg A SendString of `^a^{b}ccc` will send in 5 chunks: `^a`, `^{b}` `c`, `c`, `c`\n1. Tokens  \nThis tells SequenceSender to take a special action\n    1. It is wrapped in the Token Delimiters (`[` and `]`)  \n    1. Example token: `[Sleep, 100]` to sleep for 100ms  \n\nA SequenceString may comprise of any number of SendStrings and Tokens  \neg `^a[Sleep, 100]^c` to send Ctrl-A, wait 100ms, then send Ctrl-C  \n\n### SequenceSender object Method Reference\nOnce you have created a new SequenceSender object (eg using `ss := new SequenceSender()`), then the following functions are available for you to use:  \n\n#### Option Setting Methods  \n##### Repeat\n`Repeat(true/false)`  \neg `ss.Repeat(true)`  \nSets whether or not the sequence repeats once it gets to the end  \nDefault is `True`  \n**Note that one of `Repeat` or `ResetOnStart` must be set to True**  \n\n##### ResetOnStart\n`ResetOnStart(true/false)`  \neg `ss.ResetOnStart(false)`  \nSets whether or not the sequence resumes from the start (True) or where it left off (False) when you call `Start()`  \nDefault is `True`  \n**Note that one of `Repeat` or `ResetOnStart` must be set to True**  \n\n##### Debug\n`Debug(true/false)`  \neg `ss.Debug(true)`  \nSets Debug Mode on  \nIn Debug Mode, no characters will be sent - instead they will be logged out to the debug stream  \nUse SCiTE4AutoHotkey or DebugView to view the debug output.  \nDefaults to `False`  \n\n##### BlindMode\n`BlindMode(true/false)`  \neg `ss.BlindMode(true)`  \nEnables or Disables the `{Blind}` prefix for Sends  \nDefaults to `False`  \n\n#### Other Methods  \n##### Start\n`Start()`  \neg `ss.Start()`  \nStarts sending  \nIf SequenceSender is already sending, will not re-start, so you can safely bind to a hotkey and not worry about key repeat\n\n##### Stop\n`Stop()`  \neg `ss.Stop()`  \nStops sending  \n\n##### Toggle\n`Toggle()`  \neg `ss.Toggle()`  \nToggles between Start and Stop  \n\n##### SetState\n`SetState(state)`  \neg `ss.SetState(true)`  \nCalls `Start()` if true, else `Stop()`  \n\n##### AddTokenClass\n`AddTokenClass(token name, class name)`  \neg `ss.AddTokenClass(\"MyToken\", \"MyTokenClass\")`  \nUse your own class as a Token - see the `CustomToken.ahk` for an example  \n\n#### Default Tokens\nThe following Tokens are included:\n##### Sleep\n`[Sleep, time]`  \neg `ss.Load(\"^c[Sleep, 100]^v\")`  \nInserts a pause of `time` ms into the Sequence\n\n##### RandSleep\n`[RandSleep, min time, max time]`  \neg `ss.Load(\"^c[RandSleep, 10, 100]^v\")`  \nInserts a random sleep of between `min time` ms and `max time` ms\nEach time this Token is hit in the sequence, a new random time is picked\n\n##### ControlSend\n`[ControlSend , Control, Keys, WinTitle, WinText, ExcludeTitle, ExcludeText]`  \neg `ss.Load(\"[ControlSend, , {Space}, ahk_class Notepad]\")`  \nSame as AHK's ControlSend command  \n\n##### WinWaitActive\n`[WinWaitActive , WinTitle, WinText, Seconds, ExcludeTitle, ExcludeText]`  \neg `ss.Load(\"[WinWaitActive, ahk_class Notepad]\")`  \nSame as AHK's WinWaitActive command  \n\n##### WinWaitNotActive\n`[WinWaitNotActive , WinTitle, WinText, Seconds, ExcludeTitle, ExcludeText]`  \neg `ss.Load(\"[WinWaitActive, ahk_class Notepad]\")`  \nSame as AHK's WinWaitNotActive command  \n\n##### WinActivate\n`[WinActivate , WinTitle, WinText, ExcludeTitle, ExcludeText]`  \neg `ss.Load(\"[WinActivate, ahk_class Notepad]\")`  \nSame as AHK's WinActivate command  \n\n#### Chaining  \nAll Methods can be \"chained\".  \nfor example, to create the SequenceSender object, load a SequenceString, set some options, and start - all on one line of code, you could do:  \n`ss := new SequenceSender().Repeat(false).Load(\"^a^c\").Start()`  \nWith AHK \"continuation sections\", this can also be split across multiple lines - just make sure each new line begins with `.`:  \n```\nss := new SequenceSender()\n    .Repeat(false)\n    .Load(\"^a^c\")\n    .Start()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevilc%2Fsequencesender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevilc%2Fsequencesender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevilc%2Fsequencesender/lists"}