Project1

标题: 求助一个VA后台脚本 [打印本页]

作者: huaxim    时间: 2013-2-22 22:58
标题: 求助一个VA后台脚本
VX的和VA不兼容啊。
作者: Sion    时间: 2013-2-22 23:45
xp 那个兼容的
作者: 1715063941    时间: 2013-2-23 02:24
  1. unless $_Start


  2. $_Start = Win32API.new("Lib/BackgroundRunning","Start",'V','L')
  3. $_Stop = Win32API.new("Lib/BackgroundRunning","Stop",'V','L')
  4. $_OnFocus = Win32API.new("Lib/BackgroundRunning","OnFocus",'V','L')

  5. $_Start.call

  6. module Input
  7.   InputUpdate = method :update
  8.   InputTrigger = method :trigger?
  9.   InputPress = method :press?
  10.   InputRepeat = method :repeat?
  11.   InputDir4 = method :dir4
  12.   InputDir8 = method :dir8
  13.   def self.update
  14.     InputUpdate.call if $_OnFocus.call != 0
  15.   end
  16.   def self.trigger?(num)
  17.     return $_OnFocus.call != 0 ? InputTrigger.call(num) : false
  18.   end
  19.   def self.press?(num)
  20.     return $_OnFocus.call != 0 ? InputPress.call(num) : false
  21.   end
  22.   def self.repeat?(num)
  23.     return $_OnFocus.call != 0 ? InputRepeat.call(num) : false
  24.   end
  25.   def self.dir4
  26.     return $_OnFocus.call != 0 ? InputDir4.call : 0   
  27.   end
  28.   def self.dir8
  29.     return $_OnFocus.call != 0 ? InputDir8.call : 0   
  30.   end
  31. end


  32. end
复制代码

作者: 1715063941    时间: 2013-2-23 02:26
应该是了
作者: 1715063941    时间: 2013-2-23 02:27
要记得放在所有脚本的最上方
作者: j433463    时间: 2013-2-23 06:49
1715063941 发表于 2013-2-23 02:27
要记得放在所有脚本的最上方

我一直都是放在最底下 Main 的上面,会有什么差别吗?
作者: 1715063941    时间: 2013-2-23 10:24
不知道
听说和优化内存要放在最上方
当初怎么介绍的早就忘了
作者: 代表月亮消灭你    时间: 2013-4-29 10:31
3楼标准答案顺便还需要有Lib下的BackgroundRunning.dll

把附件解压到工程目录下

Lib.rar

19.12 KB, 下载次数: 127






欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1