Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Include, %A_ScriptDir%\Module Extensions\CLR_L.ahk
- #Include, %A_ScriptDir%\Lib\RL.ahk
- moduleExtensionsPath := A_ScriptDir . "\Module Extensions"
- rocketLauncherDllFile := moduleExtensionsPath . "\RocketLauncher.dll"
- RLObject := RL_start(rocketLauncherDllFile)
- monitorTable := BuildMonitorObject()
- Loop % monitorTable.MaxIndex()
- {
- msgbox % "monitorTable.PrimaryMonitor: " . monitorTable.PrimaryMonitor . "`nmonitorTable.Number: " . monitorTable[A_Index].Number . "`nmonitorTable.Name: " . monitorTable[A_Index].Name . "`nmonitorTable.Orientation: " . monitorTable[A_Index].Orientation . "`nmonitorTable.Left: " . monitorTable[A_Index].Left . "`nmonitorTable.Right: " . monitorTable[A_Index].Right . "`nmonitorTable.Top: " . monitorTable[A_Index].Top . "`nmonitorTable.Bottom: " . monitorTable[A_Index].Bottom . "`nmonitorTable.Width: " . monitorTable[A_Index].Width . "`nmonitorTable.Height: " . monitorTable[A_Index].Height . "`nmonitorTable.WorkingWidth: " . monitorTable[A_Index].WorkingWidth . "`nmonitorTable.WorkingHeight: " . monitorTable[A_Index].WorkingHeight
- }
- exitapp
- BuildMonitorObject() {
- Global RLObject,primMonitor
- obj := Object()
- monOrientation := Object(0,"Landscape",1,"Portrait",2,"Landscape (Flipped)",3,"Portrait (Flipped)")
- getDisplaySettingsObj := Object(1,"Width",2,"Height",3,"BitDepth",4,"Frequency",5,"Orientation")
- SysGet, MonitorCount, 80
- SysGet, primMonitor, MonitorPrimary
- obj.PrimaryMonitor := primMonitor
- Loop, %MonitorCount%
- {
- SysGet, MonitorName, MonitorName, %A_Index%
- SysGet, Monitor, Monitor, %A_Index%
- SysGet, MonitorWorkArea, MonitorWorkArea, %A_Index%
- currentobj:={}
- currentobj.Number := A_Index
- currentobj.Name := MonitorName
- monDetails := RL_getDisplaySettings(MonitorName)
- Loop, Parse, monDetails, |
- currentObj[getDisplaySettingsObj[A_Index]] := A_LoopField
- currentobj.Orientation := monOrientation[currentobj.Orientation]
- currentobj.Left := MonitorLeft
- currentobj.Right := MonitorRight
- currentobj.Top := MonitorTop
- currentobj.Bottom := MonitorBottom
- currentobj.WorkingWidth := MonitorWorkAreaRight - MonitorWorkAreaLeft
- currentobj.WorkingHeight := MonitorWorkAreaBottom - MonitorWorkAreaTop
- obj.Insert(currentobj["Number"], currentobj)
- }
- Return obj
- }
- ScriptError(txt) {
- msgbox % txt
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement