Mozillaのprefs.jsの設定
Mozilla のカスタマイズ - マニアックな設定編
user設定を色々…ここを動的に動かす方法を知りたいなぁ…xpiを調べる必要あり?
- 2007-10-11 15:15:47
- browser
rubyでGetCursorPos
GetCursorPos
require 'Win32API'
getCursorPos = Win32API.new("user32", "GetCursorPos", ['P'], 'V')
lpPoint = ' ' * 8 # store two LONGs
print getCursorPos.Call(lpPoint), "
x, y = lpPoint.unpack("LL") # get the actual values
print "x: ", x, "
print "y: ", y, "
----
こんな記事も見つける
module Cursor
=begin
== Cursor
This is for System cursor handling.
=== Class Methods
--- get_screenposition
Returns x,y in the screen coordinate.
--- set_screenposition(x,y)
Sets cursor position into (x,y) in the screen coordinate.
=end
GetCursorPos = Win32API.new("user32","GetCursorPos","P","I")
SetCursorPos = Win32API.new("user32","SetCursorPos","II","I")
POINTSTRUCT="ll" # ここ II -> ll に変更
def self.get_screenposition
r=[0,0].pack(POINTSTRUCT)
GetCursorPos.call(r)
r.unpack(POINTSTRUCT)
end
def self.set_screenposition(x,y)
SetCursorPos.call(x.to_i,y.to_i)
end
end
- 2007-10-05 18:57:22
- ruby