AutoHotkey Community

It is currently May 26th, 2012, 9:36 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: September 24th, 2008, 8:05 pm 
Mouse Spotlight Example Using WinSet Region

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

Code:
;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       WinXP
; Author:         LiquidGravity <admin@liquidgravity.us>
;
; 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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 24th, 2008, 11:03 pm 
Offline

Joined: May 25th, 2007, 6:13 pm
Posts: 373
:lol: Now THAT's pretty cool!

Ciao,
Dra'Gon

_________________
Image
For a good laugh {hopefully} >> megamatts.50megs.com

My WritersCafe profile>>
http://www.writerscafe.org/writers/BlueDragonFire/


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 25th, 2008, 1:06 pm 
Thanks :D


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 25th, 2008, 2:55 pm 
Offline

Joined: August 20th, 2008, 4:25 pm
Posts: 256
Damn that was epic. Really good job, i needed an example on WinSet region as well. You made my day twice. 8)

_________________
-Chavez.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 25th, 2008, 3:44 pm 
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.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: stevep, Stigg and 13 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group