ruby-dl2
doc
リンク
ruby-dl2http://www.ruby-lang.org/cgi-bin/cvsweb.cgi//ruby/...
PukiWiki for raccy - Ruby/DLをWindowsで使う
http://raccy.xrea.jp/pukiwiki/pukiwiki.php?%5B%5BR...
Ruby試行005 dl2遅い
Sample
- ウィンドウを列挙 (別ページ)
- カーソル位置の取得と設定
require 'dl/import' require 'dl/types' module Cursor extend DL::Importer dlload "user32.dll" include DL::Win32Types extern "BOOL GetCursorPos(void*)", :stdcall extern "BOOL SetCursorPos(long, long)", :stdcall def get_cursor_pos() point = "\0" * 8 GetCursorPos(point) point.unpack('LL') end alias :get_pos :get_cursor_pos module_function :get_pos, :get_cursor_pos def set_cursor_pos(x, y) SetCursorPos(x, y) end alias :set_pos :set_cursor_pos module_function :set_pos, :set_cursor_pos end p Cursor.get_pos Cursor.set_pos(100, 100) p Cursor.get_pos #=> [100, 100]
2007年01月31日(水) 04:29:11 Modified by aqualung