selection rectangle: use mouse to select screen region

Get help with using AutoHotkey and its commands and hotkeys
User avatar
jeeswg
Posts: 3549
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
https://autohotkey.com/board/topic/45921-letuserselectrect-select-a-portion-of-the-screen/
- 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

Return to “Ask For Help”

Who is online

Users browsing this forum: boiler, etullock, Frozen Storm, Google [Bot], zipcat1 and 42 guests