回复 17# 3mile
HotKeySet('{Esc}', 'End')
#include <mousechange.au3>
Global Const $USER32 = DllOpen("user32.dll")
Global Const $Cursor = '111.ani' ;图标文件名
;~ Global Const $CursorBack = '222.ani';原来的围标文件名
$hPrev = _WinAPI_DuplicateCursor(_WinAPI_LoadCursor(0, 32512)) ;记录当前鼠标状态
MouseSetCursor($Cursor) ;设置光标的图标
While 1
Sleep(10)
WEnd
Func MouseSetCursor($nCursor)
$cDll = DllCall($USER32, "hwnd", "LoadCursorFromFile", "str", $nCursor) ;载入
If @error <> 0 Then Return
DllCall($USER32, "int", "SetSystemCursor", "int", $cDll[0], "int", 32512);改变
If @error <> 0 Then Return
EndFunc ;==>MouseSetCursor
Func End()
_WinAPI_SetSystemCursor($hPrev, 32512);还原原始图标
;~ MouseSetCursor($CursorBack);还原原始图标
Exit
EndFunc ;==>End
|