1个回答
展开全部
送上脚本一个,美兽写的,不过建议不要修改,因为这样随之而来的是一连串的改动和不尽的烦恼。
http://bbs.66rpg.com/forum.php?mod=viewthread&tid=65472&highlight=%E5%88%86%E8%BE%A8%E7%8E%87
if $myfirst == nil
$myfirst = 'myGod'
宽度=800
高度=600
游戏ini名=".\\Game.ini"
val = "\0"*256
gps = Win32API.new('kernel32', 'GetPrivateProfileString'敏亩氏,'pppplp', 'l')
gps.call("Game"耐亮, "Title", "", val, 256, 游戏ini名)
val.delete!("\0")
title = val
fw = Win32API.new('user32', 'FindWindow', 'pp', 'i')
hWnd = fw.call("RGSS Player", title)
swp = Win32API.new('user32', '桥散SetWindowPos', 'lliiiii', 'i')
pointwds = [0,0,0,0].pack('llll')
pointcet = [0, 0].pack('ll')
wdsrect = Win32API.new('user32.dll', 'GetWindowRect', 'lp', 'l')
client_screen = Win32API.new("user32", "ClientToScreen", 'ip', 'i')
wdsrect.call(hWnd,pointwds)
client_screen.call(hWnd, pointcet)
wds = pointwds.unpack('llll')
cet = pointcet.unpack('ll')
addw = wds[2] - wds[0] - 640
addh = wds[3] - wds[1] - 480
x = wds[0] - (宽度 - 640) / 2
y = wds[1] - (高度 - 480) / 2
swp.call(hWnd, 0, x, y, 宽度 + addw, 高度 + addh, 0x20)
end
http://bbs.66rpg.com/forum.php?mod=viewthread&tid=65472&highlight=%E5%88%86%E8%BE%A8%E7%8E%87
if $myfirst == nil
$myfirst = 'myGod'
宽度=800
高度=600
游戏ini名=".\\Game.ini"
val = "\0"*256
gps = Win32API.new('kernel32', 'GetPrivateProfileString'敏亩氏,'pppplp', 'l')
gps.call("Game"耐亮, "Title", "", val, 256, 游戏ini名)
val.delete!("\0")
title = val
fw = Win32API.new('user32', 'FindWindow', 'pp', 'i')
hWnd = fw.call("RGSS Player", title)
swp = Win32API.new('user32', '桥散SetWindowPos', 'lliiiii', 'i')
pointwds = [0,0,0,0].pack('llll')
pointcet = [0, 0].pack('ll')
wdsrect = Win32API.new('user32.dll', 'GetWindowRect', 'lp', 'l')
client_screen = Win32API.new("user32", "ClientToScreen", 'ip', 'i')
wdsrect.call(hWnd,pointwds)
client_screen.call(hWnd, pointcet)
wds = pointwds.unpack('llll')
cet = pointcet.unpack('ll')
addw = wds[2] - wds[0] - 640
addh = wds[3] - wds[1] - 480
x = wds[0] - (宽度 - 640) / 2
y = wds[1] - (高度 - 480) / 2
swp.call(hWnd, 0, x, y, 宽度 + addw, 高度 + addh, 0x20)
end
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询