I run it on Windows 10. The following script works fine on XP. Its function is to move the window clicked on to a specific position:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTitleMatchMode, 2 ; Can match any bit of title
CoordMode, Mouse, Screen ; All mouse movements are relative to whole screen
SetMouseDelay, 30 ; Milliseconds to recognise each mouse click
#Include c:\s\Macros\SetScreenEnvVars.ahk ; Set up NMWidth and NMHeight variables for this PC
KeyWait, LButton, D ; Wait for the left mouse button to be pressed down.
KeyWait, LButton, U ; Wait for the left mouse button to be released
WinGetActiveTitle, Title
WinMove , %Title%, , 1, 1, NMWidth, NMHeight
I modified the script to be:
Code: Select all
KeyWait, LButton, D ; Wait for the left mouse button to be pressed down.
msgbox ,,, Down
KeyWait, LButton, U ; Wait for the left mouse button to be released
msgbox ,,, Up
Any thoughts?