 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Zed Gecko
Joined: 23 Sep 2006 Posts: 149
|
Posted: Wed Jul 29, 2009 8:16 am Post subject: Spot_On_Mouse & Single-Window |
|
|
i´d like to share this very simple script:
Spot_On_Mouse creates a spotlight-like effect around the mouse-cursor.
"CTRL + ALT + S" toggles the spotlight-mode on/off
"+" and "-" resize the spot
"CTRL + ALT + M" starts the "find-the-mouse-cursor" aid-tool
| Code: | code removed due to protest.
http://www.autohotkey.com/forum/viewtopic.php?t=81795
|
another (more useful) use for this method might be Single-Window found below.
Last edited by Zed Gecko on Sat Jan 28, 2012 2:13 am; edited 2 times in total |
|
| Back to top |
|
 |
HotKeyIt
Joined: 18 Jun 2008 Posts: 4652 Location: AHK Forum
|
|
| Back to top |
|
 |
Zed Gecko
Joined: 23 Sep 2006 Posts: 149
|
Posted: Wed Jul 29, 2009 9:12 am Post subject: |
|
|
thanks.
the same method targeted at the active window results to this:
Single Window , blacks-up everything but the active window.
"CTRL + ALT + S" toggles the "Single Window"-mode on/off
| Code: | code removed due to protest.
http://www.autohotkey.com/forum/viewtopic.php?t=81795
|
_________________ code removed due to protest.
http://www.autohotkey.com/forum/viewtopic.php?t=81795
Last edited by Zed Gecko on Sat Jan 28, 2012 2:13 am; edited 1 time in total |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 8688
|
Posted: Wed Jul 29, 2009 9:15 am Post subject: |
|
|
Cute..  |
|
| Back to top |
|
 |
HotKeyIt
Joined: 18 Jun 2008 Posts: 4652 Location: AHK Forum
|
|
| Back to top |
|
 |
Z_Gecko Guest
|
Posted: Wed Jul 29, 2009 9:56 am Post subject: |
|
|
mmhm,
i have no dual-monitor setup, so i have to think about it a bit. |
|
| Back to top |
|
 |
Zed Gecko
Joined: 23 Sep 2006 Posts: 149
|
Posted: Wed Jul 29, 2009 10:08 am Post subject: |
|
|
does this work better? | Code: | code removed due to protest.
http://www.autohotkey.com/forum/viewtopic.php?t=81795
|
_________________ code removed due to protest.
http://www.autohotkey.com/forum/viewtopic.php?t=81795
Last edited by Zed Gecko on Sat Jan 28, 2012 2:14 am; edited 1 time in total |
|
| Back to top |
|
 |
HotKeyIt
Joined: 18 Jun 2008 Posts: 4652 Location: AHK Forum
|
Posted: Wed Jul 29, 2009 10:20 am Post subject: |
|
|
No, unfortunately not. Half of screen is black and on second monitor as well but a part of the black screen is also visible.
Looks like it got a problem when active window is on the second screen as this one is not set black.
I think you would need to address both screens separately (for each its own black window). _________________ AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun  |
|
| Back to top |
|
 |
Z_Gecko Guest
|
Posted: Wed Jul 29, 2009 10:51 am Post subject: |
|
|
how about that?
| Code: | spotstate := 1
Gui -Caption +AlwaysOnTop +LastFound +ToolWindow
Gui, Color, 0x000000, 0x000000
WinGet, IDvar , ID
SysGet, V_ScreenX, 76
SysGet, V_ScreenY, 77
SysGet, V_ScreenWidth, 78
SysGet, V_ScreenHeight, 79
PolygonP1 := V_ScreenX . "-" . V_ScreenY . " "
gosub, MakePolygonP2
PolygonP3 := V_ScreenX . "-" . V_ScreenY . " " . V_ScreenX . "-" . V_ScreenHeight . " " . V_ScreenWidth . "-" . V_ScreenHeight . " " . V_ScreenWidth . "-" . V_ScreenY . " " . V_ScreenX . "-" . V_ScreenY
MakeSingle:
activestart := WinActive("A")
Gui, Show, x%V_ScreenY% y%V_ScreenY% h%V_ScreenHeight% w%V_ScreenWidth%
WinActivate, ahk_id %activestart%
loop
{
gosub, MakePolygonP2
Polygon := PolygonP1 . PolygonP2 . PolygonP3
WinSet, Region, %Polygon%, ahk_id %IDvar%
IfWinNotExist ahk_class #32771
Gui +AlwaysOnTop
sleep, 10
if (spotstate != 1)
break
}
return
~^!s::
spotstate := !spotstate
if (spotstate = 0)
Gui, Hide
else
SetTimer, MakeSingle, -1
return
Esc::ExitApp
MakePolygonP2:
WinGetActiveStats, Title, Width, Height, X, Y
PolygonP2 := X . "-" . Y . " " . X . "-" . Y + Height . " " . X + Width . "-" . Y + Height . " " . X + Width . "-" . Y . " " . X . "-" . Y . " "
return |
|
|
| Back to top |
|
 |
HotKeyIt
Joined: 18 Jun 2008 Posts: 4652 Location: AHK Forum
|
|
| Back to top |
|
 |
Z_Gecko Guest
|
Posted: Wed Jul 29, 2009 11:26 am Post subject: |
|
|
that looks weird.
i found a typo, if that not solves it, i´m out of options
| Code: | spotstate := 1
Gui -Caption +AlwaysOnTop +LastFound +ToolWindow
Gui, Color, 0x000000, 0x000000
WinGet, IDvar , ID
SysGet, V_ScreenX, 76
SysGet, V_ScreenY, 77
SysGet, V_ScreenWidth, 78
SysGet, V_ScreenHeight, 79
PolygonP1 := V_ScreenX . "-" . V_ScreenY . " "
gosub, MakePolygonP2
PolygonP3 := V_ScreenX . "-" . V_ScreenY . " " . V_ScreenX . "-" . V_ScreenHeight . " " . V_ScreenWidth . "-" . V_ScreenHeight . " " . V_ScreenWidth . "-" . V_ScreenY . " " . V_ScreenX . "-" . V_ScreenY
MakeSingle:
activestart := WinActive("A")
Gui, Show, x%V_ScreenX% y%V_ScreenY% h%V_ScreenHeight% w%V_ScreenWidth%
WinActivate, ahk_id %activestart%
loop
{
gosub, MakePolygonP2
Polygon := PolygonP1 . PolygonP2 . PolygonP3
WinSet, Region, %Polygon%, ahk_id %IDvar%
IfWinNotExist ahk_class #32771
Gui +AlwaysOnTop
sleep, 10
if (spotstate != 1)
break
}
return
~^!s::
spotstate := !spotstate
if (spotstate = 0)
Gui, Hide
else
SetTimer, MakeSingle, -1
return
Esc::ExitApp
MakePolygonP2:
WinGetActiveStats, Title, Width, Height, X, Y
PolygonP2 := X . "-" . Y . " " . X . "-" . Y + Height . " " . X + Width . "-" . Y + Height . " " . X + Width . "-" . Y . " " . X . "-" . Y . " "
return |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|