Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Rubygems

For general discussion related FlowStone

Re: Rubygems

Postby DSP » Wed Jan 11, 2012 10:13 pm

Wrapping up into a FlowStone Project:

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
end


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?
Attachments
Ruby Get Window Title.fsm
Show the Title of a Selected Window
(466 Bytes) Downloaded 1138 times
DSP
 
Posts: 150
Joined: Fri May 14, 2010 10:55 pm

Re: Rubygems

Postby sal » Thu Jan 12, 2012 1:14 pm

thank you,
i did already try do change the PATH and my mistake was about my ruby version compiled with minigw, with the mswin version i can use some gems and i'm having problems with some other gems(the ones i would use) such as the sqlite3 and the mysql ones.

For example trying to require sqlite3 from irb it works, but inside flowstone ruby module it doesn't.
Attachments
sqlite3fail.jpg
sqlite3fail.jpg (34.5 KiB) Viewed 9527 times
sqlite3.jpg
sqlite3.jpg (17.63 KiB) Viewed 9527 times
sal
 
Posts: 42
Joined: Thu Aug 19, 2010 4:56 pm

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 38 guests