generated from Nigh/ahk-autoupdate-template
-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathisFullScreen.ahk
49 lines (45 loc) · 912 Bytes
/
isFullScreen.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*!
Checks if a window is in fullscreen mode.
______________________________________________________________________________________________________________
Usage: isFullScreen()
Return: True/False
GitHub Repo: https://github.com/Nigh/isFullScreen
*/
class isFullScreen
{
static monitors:=this.init()
static init()
{
a:=[]
loop MonitorGetCount()
{
MonitorGet(A_Index, &Left, &Top, &Right, &Bottom)
a.Push({l:Left,t:Top,r:Right,b:Bottom})
}
Return a
}
static Call(*)
{
uid:=WinExist("A")
if(!uid){
Return False
}
wid:="ahk_id " uid
c:=WinGetClass(wid)
If (uid = DllCall("GetDesktopWindow") Or (c = "Progman") Or (c = "WorkerW")){
Return False
}
WinGetClientPos(&cx,&cy,&cw,&ch,wid)
cl:=cx
ct:=cy
cr:=cx+cw
cb:=cy+ch
For , v in this.monitors
{
if(cl==v.l and ct==v.t and cr==v.r and cb==v.b){
Return True
}
}
Return False
}
}