注册会员 登录
Project1 返回首页

zh99998的个人空间 https://rpg.blue/?42757 [收藏] [复制] [分享] [RSS]

日志

比特彗星批量制种的脚本

已有 528 次阅读2010-7-25 09:43 |个人分类:66RPG|

折腾了N久找不到个合格的批量制种的东西。。。mkt和bitsprite功能又都不全XDD
所以干脆写脚本来批量做

#需要比特彗星1.22简体中文版正在运行,并且无上传下载
#需要Iconv及EasyConv
#需要一个dll:http://bbs.66rpg.com/forum.php?mod=redirect&goto=findpost&ptid=142357&pid=1458032&fromuid=42757
list_file = "D:\\ftp\\ftpfile.txt"

BM_CLICK = 0x00F5
making = EasyConv.u2s("正在制作Torrent文件...")
mkwindow = EasyConv.u2s("制作Torrent文件")
make = EasyConv.u2s("制作")

visible = Win32API.new("user32","IsWindowVisible","l","l")
fw = Win32API.new("user32","FindWindow","lp","l")
fwex = Win32API.new("user32","FindWindowEx","llpp","l")
click = Win32API.new("user32","SendMessage","ll","v")
dropfile = Win32API.new("SensWM_DROPFILES.dll", "SendWM_DROPFILES", "lp", "v")
sfw = Win32API.new("user32", "SetForegroundWindow", "l", "v")
mainwindow_hwnd = fw.call(0, EasyConv.u2s("BitComet(比特彗星) 1.22 - 下载:0 kB/s, 上传:0 kB/s"))


raise "获取BitComet窗口失败" if mainwindow_hwnd == 0
IO.foreach(list_file) do |line|
  line.chomp!
  next unless File.file?(Iconv.gb2312_to_utf8(line))
  sfw.call(mainwindow_hwnd)
  dropfile.call(mainwindow_hwnd, line)
  mkwindow_hwnd = fw.call(0, mkwindow)
  mkbutton_hwnd = fwex.call(mkwindow_hwnd, 0, "Button", make)
  click.call(mkbutton_hwnd, BM_CLICK)
  sleep 0.1 while visible.call(fw.call(0,making)) == 1
end
exit

鸡蛋

鲜花

评论 (0 个评论)

facelist doodle 涂鸦笔

您需要登录后才可以评论 登录 | 注册会员

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2022-1-19 14:58

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

返回顶部