Версия для печати темы

Нажмите сюда для просмотра этой темы в обычном формате

UoKit.com Форумы _ UO Pilot _ Disable mouse for given window

Автор: neves 5.5.2020, 20:23

Есть ли способ заблокировать мышь для данного окна во время работы скрипта?
Is there a way to block the mouse for given window while script is running?

------------------------------------

I found this topic -> https://forum.uokit.com/index.php?showtopic=69089, but it disables mouse at all. My goal is to disable the mouse(clicks and moves) for the workwindow() only.
Я нашел эту тему -> мышь отключена, но она вообще отключает мышь. Моя цель - отключить мышь (щелчки и движения) только для workwindow().

Автор: cirus 5.5.2020, 21:22

Код
--lua
local ffi = require("ffi")
local user = ffi.load('User32')
ffi.cdef[[ bool EnableWindow(int hWnd, bool bEnable); ]]


user.EnableWindow(workwindow(), false)   -- disable window
wait(5000)
user.EnableWindow(workwindow(), true)    -- enable window

Автор: neves 5.5.2020, 22:30

Thank you cirus!

Русская версия Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)