GetMessage = Win32API.new("user32", "GetMessage", ['P', 'L', 'I', 'I'], 'I')
FindWindow = Win32API.new("user32", "FindWindowA", ['P','P'], 'L')
TranslateMessage = Win32API.new("user32", "TranslateMessage", ['P'], 'I')
hw = FindWindow.call("RGSS Player",nil)
msg = " " * 28
begin
while(GetMessage.call(msg, hw, 0, 0))
TranslateMessage.call(msg)
temp = msg.unpack("L*")
if temp[1] == 258
p "WM_CHAR", temp[2], temp[2].chr
end
end
rescue Hangup
retry
end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |