I do:
I copy "Win32API.so" and the newLISP.dll to the Sketchup Plugins folder
(The library can be found in ruby distribution: \ruby\lib\ruby\1.8\i386-mswin32\Win32API.so)
In the ruby console in SketchUp:
Code: Select all
require 'Win32API'
true
newLISP = Win32API.new("newlisp.dll", "newlispEvalStr", ['P'], 'V')
Error: #<RuntimeError: (eval):131:in `initialize': LoadLibrary: newlisp.dll
>
(eval):131
http://phrogz.net/ProgrammingRuby/lib_w ... l#Win32API
See: class Win32API < Object
This is a working code example:
Code: Select all
findWindow = Win32API.new("user32.dll", "FindWindow", ['P','P'], 'N')
window_id = findWindow.call(0, sketchup_title)
sendMessage = Win32API.new("user32.dll", "SendMessage", ['N','N','N','P'], 'N')
sendMessage.call(window_id, 0x0010, 0, "")