Jump to content
  1. jaberwacky

    jaberwacky

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By tcurran
      Given a specific XY coordinate, this snippet returns the handle to the monitor the coordinate appears on... or 0 if it is off all screens. Particularly useful in multiple monitor setups where monitors have different resolutions or are offset vertically or horizontally (in which case, there are areas of the virtual desktop that are off all screens).
      You could also use it to return the handle of the monitor where a window is placed, or where the mouse was clicked, or other similar applications.
      #include <WinAPIGdi.au3> ;for _WinOnMonitor() Func _WinOnMonitor($iXPos, $iYPos) Local $aMonitors = _WinAPI_EnumDisplayMonitors() If IsArray($aMonitors) Then ReDim $aMonitors[$aMonitors[0][0] + 1][5] For $ix = 1 To $aMonitors[0][0] $aPos = _WinAPI_GetPosFromRect($aMonitors[$ix][1]) For $j = 0 To 3 $aMonitors[$ix][$j + 1] = $aPos[$j] Next Next EndIf For $ixMonitor = 1 to $aMonitors[0][0] ; Step through array of monitors If $iXPos > $aMonitors[$ixMonitor][1] And $iXPos < $aMonitors[$ixMonitor][1] + $aMonitors[$ixMonitor][3] Then If $iYPos > $aMonitors[$ixMonitor][2] And $iYPos < $aMonitors[$ixMonitor][2] + $aMonitors[$ixMonitor][4] Then Return $aMonitors[$ixMonitor][0] ; return handle to monitor coordinate is on EndIf EndIf Next Return 0 ;Return 0 if coordinate is on none of the monitors EndFunc ;==> _WinOnMonitor  
    • By jaberwacky
      This script is intended to allow the user to move their mouse to the edge of their screen and have the mouse appear to the opposite end. 
      When the user drags the mouse to the edge of a monitor there is a 300 millisecond delay before the mouse will wrap.  This will give the user some time to change their mind and give some time for the taskbar to open if the user has it set to autohide. 
      When the user drags a window or selection rectangle to the edge of a monitor the user will have 700 milliseconds to take advantage of the Windows 7 Snap feature.  If the user has not moved the mouse from the edge within that time then the window will move to the opposite edge. 
      When the user holds down the mouse wheel the wrap effect is disabled.
      Tested on Windows 7 x64 with two monitors placed horizontally.
      Updates:


      MouseWrap.zip - Source works on latest AutoIt beta.  Includes an exe.
      downloads: 197
×
×
  • Create New...