From: "Marvin Gülker" Date: 2010-04-18T03:07:22+09:00 Subject: Re: How to use AutoIt in Ruby Colin Bartlett wrote: > But I'd still be interested if anyone can get this to work in Ruby > 1.9.1. You could use the win32-api gem: --------------------------------------- require "win32/api" MessageBox = Win32::API.new("MessageBox", 'LPPI', 'I', "user32") MessageBox.call(0, "Text here", "title here", 0) --------------------------------------- The constants for style and return value remain the same. The above code will get the ASCII function, if you want the UTF-16 + extra-NUL-w-function use this: --------------------------------------- MessageBox = Win32::API.new("MessageBoxW", 'LPPI', 'I', "user32") title = "Title\0".encode("UTF-16LE") text = "Text with ä\0".encode("UTF-16LE") MessageBox.call(0, text, title, 0) ------------------------------------- If I ommit the trailing NUL, I get some strange Chinese characters displayed. Disclaimer: This was written from memory, at the moment I haven't a Windows machine to test. Tomorrow I can check if it works. Marvin -- Posted via http://www.ruby-forum.com/.