[Script] WinHole
Posted: 15 Apr 2017, 18:22
Introduction
This is a script for making a see-through hole (circle) in the window under the mouse. The center of the hole follows the mouse, the hole can be inverted.
Preview
For a short video preview, visit sendvid.com. (Makes an inverted hole in a window which shows a cup of coffee, revealing the code for this script beneath, toggles inverted setting.)
Download
How to use
Hotkeys:
At the top of the script, these settings can be changed,
Additional regions
Put the functions in the code, and replace two occasions of region:=makeCircle(radius) with region:=x(radius).
The hole is a polygon set by WinSet,Region, x-y....
Known issues and limitations
This was made for fun, if you make a custom shape, please share it, I'll link to it from this post
You may use this in any way and any context you like.
Good luck
Edit: Minor change in the heart code
This is a script for making a see-through hole (circle) in the window under the mouse. The center of the hole follows the mouse, the hole can be inverted.
Preview
For a short video preview, visit sendvid.com. (Makes an inverted hole in a window which shows a cup of coffee, revealing the code for this script beneath, toggles inverted setting.)
Download
How to use
Hotkeys:
- Esc,exit script. Restores the window first, if needed.
- F1 Toggle on/off.
- F2 Toggle inverted setting when the toggle is on.
- F3 Toggle pause when the toggle is on. When paused, the hole doesn't follow the mouse.
- WheelUp Increases the radius of the hole
- WheelDown Decreases the radius of the hole
At the top of the script, these settings can be changed,
- radius, the starting radius of the circle.
- incrementthe amount to decrease/increase radius of circle when turning the scroll wheel.
- inverted, If false, the region is see-throughable.
- rate, the period (ms) of the timer.
Additional regions
Put the functions in the code, and replace two occasions of region:=makeCircle(radius) with region:=x(radius).
A fancy heart
A regular triangle
About the implementaionThe hole is a polygon set by WinSet,Region, x-y....
Known issues and limitations
- Very limited testing, only tested on 1.1.25.01 Unicode 64, Win7.
- Tested only with the circle region.
- Some windows doesn't seem to respond well to WinSet,Region,...
This was made for fun, if you make a custom shape, please share it, I'll link to it from this post
You may use this in any way and any context you like.
Good luck
Edit: Minor change in the heart code