selection rectangle: use mouse to select screen region

Get help with using AutoHotkey and its commands and hotkeys
User avatar
Posts: 4795
Joined: 19 Dec 2016, 01:58
Location: UK

selection rectangle: use mouse to select screen region

15 Jan 2018, 01:26

- I wrote a script based on LetUserSelectRect by Lexikos:
LetUserSelectRect - select a portion of the screen - Scripts and Functions - AutoHotkey Community
- I've changed it to use a transparent filled-in rectangle, instead of opaque borders, and it now supports right-click/Esc to cancel, plus it's generally been rewritten.
- You press q, and then when you hold down the left mouse button, a red selection rectangle appears, and when you release the button, the rectangle disappears, and a printscreen is taken of that region and displayed using SplashImage.
- Pressing the right mouse button or Esc cancels the selection.
- Note: the script requires the Gdip/Gdip_All library.

- Problems are that: at the moment it requires CoordMode be set in the auto-execute section, it uses a global variable, and it uses labels within a function.
- I'm posting in case anyone has any suggestions on how to improve it.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

User avatar
Posts: 960
Joined: 15 Nov 2014, 21:31
GitHub: Flipeador
Location: Argentina

Re: selection rectangle: use mouse to select screen region

10 May 2018, 20:47


Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus

Windws 1♂ Pro 64-Bits I make scripts for AHKv2 (my v2 compiler) & WIN_7+ Spanish Argentina SublimeText 3 & AHKv2 My GDI+ Library

Return to “Ask For Help”

Who is online

Users browsing this forum: wideeyedguy and 47 guests