Re: Rubygems
Posted: Wed Jan 11, 2012 10:13 pm
Wrapping up into a FlowStone Project:
As you say works without the buffer? Maybe it's a Ruby thing as you don't have to define the size of the variable?
Code: Select all
require "Win32API"
def event i,v
getForegroundWindow = Win32API.new('user32', 'GetForegroundWindow', 'V', 'L')
window_handle = getForegroundWindow.Call()
getWindowText = Win32API.new('user32', 'GetWindowText', 'LP', 'I')
title_buffer = ' ' * 512
getWindowText.Call(window_handle, title_buffer)
output 0,title_buffer
endAs you say works without the buffer? Maybe it's a Ruby thing as you don't have to define the size of the variable?