This is a minimal Windows utility which makes all visible text available for copy and paste.
Too often there is text on the screen but it is unable to be selected. This happens when text is saved in an image, in a video, or the text within an application.
The OCR is done locally by Windows 10 API. This enables Text Grab to have essentially no UI and not require a constantly running background process.
Get the code:
- Install git: https://git-scm.com/download/win
- git clone https://github.com/TheJoeFin/Text-Grab.git
- Install the Visual Studio (the free community edition is sufficient).
- Install the "Universal Windows Platform Development" workload.
- Install the ".NET desktop development" workload.
- Install ".NET cross-platform development" toolset
- Install Windows 10 SDK (10.0.19041.0)
- Open Text-Grab\Text-Grab.sln in Visual Studio.
- Set Text-Grab-Package as Startup Project
- Set CPU Target to x86 or x64
- Key F5 or Press "▶ Local Machine"
- Install Visual Studio Code https://code.visualstudio.com/
- Install .NET 5.0 SDK https://dotnet.microsoft.com/download/dotnet/5.0
- Open Text-Grab\Text-Grab Folder in VS Code
- Run terminal commands:
- dotnet restore
- dotnet build
The first full screen use case is the most obvious, selecting a region of the screen and the text within the selected region will be added to the clipboard.
The second use case takes a single click and attempts to copy the word which was clicked on. This is enabled because the Windows 10 OCR API draws a bounding box around each recognized word.
If the click point or selected region has no text in it the Text Grab window stays active. To exit the application, press the escape key, or Alt+F4.
Grab frame is a mostly transparent frame with a search bar and Grab button. The Grab Frame can be positioned wherever you want to copy the text. This can be done by searching for text, clicking on a word border, and/or clicking on the Grab button.
The underlying OCR technology is the same as the full screen mode and has all of the same benefits and drawbacks. Since Text Grab is using OCR the recognition is not perfect. However, adjusting the size and position of the window does affect the OCR's accuracy.
Similar to Notepad, the Edit Text Window is a "Pure Text" editing experience, with no formatting. This means copying text into or out of the Window will remove all formatting, but linebreaks and tabs will remain. Gather text using Full Screen Grabs or Grab Frames.
There are several tools with in the Edit Text Window which make it quick and easy to fix or change text.
- Make text into a single line
- Toggle between UPPERCASE, lowercase, and Titlecase
- Trim spaces and empty lines
- Isolate selected text
- Replace reserved characters (like spaces, /, %, etc.)
- Find and replace
- Extract regular expressions
- Remove duplicate lines
- Convert stacked data to table format
- And more!
Text Grab is designed to be as minimal and quick as possible. By using Windows 10’s OCR capabilities Text Grab can launch quickly without needing to run in the background. Pinning Text Grab to the Taskbar enables launching via keyboard shortcut. There is no history, or dialog box, or feedback. This tool is designed to be used hundreds of times a day. Reducing clicks and menus means saving time, which is the primary focus of Text Grab.
Hopefully this simple app makes you more productive and saves you time from transcribing text. If you have any questions or feedback reach out on Twitter @TheJoeFin or by email joe@textgrab.net