【 WindowScrollwheelHandler 】
格式:
WindowScrollwheelHandler(BSTR WindowName,
BSTR HotspotId,
BSTR MoveCallback)
中文:
WindowScrollwheelHandler(迷你視窗名稱,
熱點ID,
移動回調函數名稱)
說明:
為熱點掛上滑鼠滾動鍵的動作。使用者必須自行建立一個移動回調函數來
定義動作內容。在回調函數中,使用者可以使用下列常數去區分滑鼠的動作:
值 │說明 │Lua標記
│0x01 (1) │按著Shift鍵 │miniwin.wheel_got_shift │
│0x02 (2) │按著Ctrl鍵 │miniwin.wheel_got_control │
│0x04 (4) │按著Alt鍵 │miniwin.wheel_got_alt │
│0x100 (256) │向下滑動滾輪 (朝向你) │miniwin.wheel_scroll_back │
└──────┴───────────┴───────────────┘
範例:程式作者提供回調函數的格式供使用者參考。
--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--
function wheel_move (flags, hotspot_id)
if bit.band (flags, miniwin.wheel_scroll_back) ~= 0 then
-- wheel scrolled down (towards you)
else
-- wheel scrolled up (away from you)
end -- if
return 0 -- needed for some languages
end -- wheel_move
--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--
來源:http://www.gammon.com.au/mushclient/mw_hotspots.htm