先在脚本编辑器插入这段脚本:
Keybd_event = Win32API.new('user32.dll', 'keybd_event', ["L"] * 4, 'L') def toggle_fullscreen Keybd_event.call(0x12, 0, 0, 0) # ALT DOWN Keybd_event.call(0x0D, 0, 0, 0) # ENTER DOWN Keybd_event.call(0x12, 0, 2, 0) # ALT UP Keybd_event.call(0x0D, 0, 2, 0) # ENTER UP end
Keybd_event = Win32API.new('user32.dll', 'keybd_event', ["L"] * 4, 'L')
def toggle_fullscreen
Keybd_event.call(0x12, 0, 0, 0) # ALT DOWN
Keybd_event.call(0x0D, 0, 0, 0) # ENTER DOWN
Keybd_event.call(0x12, 0, 2, 0) # ALT UP
Keybd_event.call(0x0D, 0, 2, 0) # ENTER UP
end
然后就可以在任何能打脚本的地方通过下面这行脚本来切换全屏状态
|