Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

MSpot Mouse Spotlight Example Using WinSet Region


  • Please log in to reply
4 replies to this topic
LiquidGravity
  • Guests
  • Last active:
  • Joined: --
Mouse Spotlight Example Using WinSet Region

I think that about says it all. Here is the code.

;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       WinXP
; Author:         LiquidGravity <[email protected]>
;
; Script Function:
;	Mouse Spotlight Example Using WinSet Region
;
#SingleInstance force
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

Gui, Margin , 0, 0
Gui, -Caption +AlwaysOnTop
Gui, Color, 000000
Gui, Show, Maximize, Mouse Spotlight
WinSet, Transparent, 200, Mouse Spotlight
WinSet, Region, 0-85 0-%A_ScreenHeight% %A_ScreenWidth%-%A_ScreenHeight% %A_ScreenWidth%-0 0-0 0-85, Mouse Spotlight
SetTimer, Alert2, 50
Return


Alert2:
    CoordMode,Mouse, Screen
    MouseGetPos, OutputVarX3, OutputVarY3, OutputVarWin, OutputVarControl
    OutputVarX1:= OutputVarX3 -80
    OutputVarX2:= OutputVarX3 -56
    OutputVarX4:= OutputVarX3 +56
    OutputVarX5:= OutputVarX3 +80

    OutputVarY1:= OutputVarY3 -80
    OutputVarY2:= OutputVarY3 -56
    OutputVarY4:= OutputVarY3 +56
    OutputVarY5:= OutputVarY3 +80

    WinSet, Region, 0-85 0-%A_ScreenHeight% %A_ScreenWidth%-%A_ScreenHeight% %A_ScreenWidth%-0 0-0 0-85   %OutputVarX1%-%OutputVarY3% %OutputVarX2%-%OutputVarY4% %OutputVarX3%-%OutputVarY5% %OutputVarX4%-%OutputVarY4% %OutputVarX5%-%OutputVarY3% %OutputVarX4%-%OutputVarY2% %OutputVarX3%-%OutputVarY1% %OutputVarX2%-%OutputVarY2% %OutputVarX1%-%OutputVarY3%, Mouse Spotlight
Return


GuiClose:
2GuiClose:
ExitApp


Dra_Gon
  • Members
  • 373 posts
  • Last active: Oct 27 2009 04:20 PM
  • Joined: 25 May 2007
:lol: Now THAT's pretty cool!

Ciao,
Dra'Gon
Posted Image
For a good laugh {hopefully} >> megamatts.50megs.com

My WritersCafe profile>>
http://www.writersca...BlueDragonFire/

LiquidGravity
  • Guests
  • Last active:
  • Joined: --
Thanks :D

Chavez
  • Members
  • 256 posts
  • Last active: Oct 13 2009 01:27 PM
  • Joined: 20 Aug 2008
Damn that was epic. Really good job, i needed an example on WinSet region as well. You made my day twice. 8)
-Chavez.

LiquidGravity
  • Guests
  • Last active:
  • Joined: --
Its all rather short and simple. I've been wanting to do some playing with WinSet, Region for a while now.

You can make it more rounded by adding more in between points. The taskbar likes to jump over it sometimes but that can be avoided by changing the "Keep the taskbar on top of other windows" setting to off.