!include WinMessages.nsh
!include "${NSISDIR}ExamplesSystemSystem.nsh"
Call RefreshSysTray
Function RefreshSysTray
FindWindow $0 "Shell_TrayWnd" ""
FindWindow $0 "TrayNotifyWnd" "" $0
FindWindow $0 "SysPager" "" $0
FindWindow $0 "ToolbarWindow32" "" $0
System::Call "*${stRECT} .r1"
System::Call "User32::GetWindowRect(i, i) i (i r0, r1) .r2"
System::Call "*$1${stRECT} (.r2, .r3, .r4, .r5)"
System::Free $1
IntOp $2 $4 - $2
IntOp $3 $5 - $3
System::Call 'User32::GetSystemMetrics(i 49) i .r4'
System::Call 'User32::GetSystemMetrics(i 50) i .r5'
IntOp $7 $4 / 2
IntOp $7 $3 - $7
LoopY:
IntOp $6 $5 / 2
IntOp $6 $2 - $6
LoopX:
SendMessage $0 ${WM_MOUSEMOVE} 0 "$6 | $7"
IntOp $6 $6 - $4
IntCmp $6 0 EndLoopX EndLoopX LoopX
EndLoopX:
IntOp $7 $7 - $5
IntCmp $7 0 EndLoopY EndLoopY LoopY
EndLoopY:
FunctionEnd
THE END
暂无评论内容