An open API service indexing awesome lists of open source software.

https://github.com/ardatetikbey/winscreen

A library that allows you to take screenshots on Windows systems
https://github.com/ardatetikbey/winscreen

powershell ruby screenshot

Last synced: 6 months ago
JSON representation

A library that allows you to take screenshots on Windows systems

Awesome Lists containing this project

README

          

# Winscreen

`Winscreen` is a simple Ruby module that allows you to take screenshots on Windows operating systems. It uses PowerShell commands to capture the screen and save the image to a specified file.

## Features

- Takes a screenshot using a PowerShell script.
- Designed to work on Windows operating systems.
- Automatically normalizes file paths to ensure compatibility across platforms.

## Installation

1. Ensure that Ruby is installed on your system.
2. To include this module in your project, you can either install it as a gem or copy the contents into a Ruby file.

### Install via RubyGems

```bash
gem install winscreen
```

## Requirements

- Ruby 2.x or higher
- Windows operating system (works only on Windows)

## Usage

```ruby
require 'winscreen'

Winscreen.screenshot("screenshot.png")
Winscreen.screenshot("C:\\Users\\YourName\\Desktop\\screenshot.png")
Winscreen.screenshot("C:/Users/YourName/Desktop/screenshot.png")
```

## License

This project is licensed under the MIT License.