Skip to content

Instantly share code, notes, and snippets.

@sl5net
Created June 5, 2015 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sl5net/d837ca8ef18fbf05e8cc to your computer and use it in GitHub Desktop.
Save sl5net/d837ca8ef18fbf05e8cc to your computer and use it in GitHub Desktop.
monitors2txt.ahk
; Example #1:
SysGet, MouseButtonCount, 43
SysGet, VirtualScreenWidth, 78
SysGet, VirtualScreenHeight, 79
; Example #2: This is a working script that displays info about each monitor:
SysGet, MonitorCount, MonitorCount
SysGet, MonitorPrimary, MonitorPrimary
monitorTXT := "Monit!or15-06-05_07-57.txt" ; dateinamen für die ausgabe der monitor daten
IfExist,%monitorTXT%
FileDelete,%monitorTXT%
Sleep,100
monitor_Count = Monitor Count:`t%MonitorCount%`nPrimary Monitor:`t%MonitorPrimary%
FileAppend,%monitor_Count%, %monitorTXT%
Loop, %MonitorCount%
{
SysGet, MonitorName, MonitorName, %A_Index%
SysGet, Monitor, Monitor, %A_Index%
SysGet, MonitorWorkArea, MonitorWorkArea, %A_Index%
width := MonitorRight - MonitorLeft
monitor_t_A_Index = Monitor:`t#%A_Index%`nName:`t%MonitorName%`n%width% := width `nLeft:`t%MonitorLeft% (%MonitorWorkAreaLeft% work)`nTop:`t%MonitorTop% (%MonitorWorkAreaTop% work)`nRight:`t%MonitorRight% (%MonitorWorkAreaRight% work)`nBottom:`t%MonitorBottom% (%MonitorWorkAreaBottom% work)
FileAppend,%monitor_t_A_Index%, %monitorTXT%
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment