From: "Marvin Gülker" Date: 2009-11-28T17:03:23+09:00 Subject: Re: Windows Pop Up jackster the jackle wrote: > I don't normally run ruby scripts on my windows machine but in this > case, I have one that I need to send a pop up message to the user > through the GUI when the script is run. > > Does anyone have any base code they can share to perform this function? > > thanks > > jack For Windows, it should work with the MessageBox function from the WinAPI: http://msdn.microsoft.com/en-us/library/ms645505%28VS.85%29.aspx ---------------------------------- require "win32/api" #win32-api gem MessageBox = Win32::API.new("MessageBox", 'LPPI', 'I', "user32") MB_OK = 0x00000000 MB_OKCANCEL = 0x00000001 MB_ABORTRETRYIGNORE = 0x00000002 MB_YESNOCANCEL = 0x00000003 MB_YESNO = 0x00000004 MB_RETRYCANCEL = 0x00000005 MB_ICONHAND = 0x00000010 MB_ICONQUESTION = 0x00000020 MB_ICONEXCLAMATION = 0x00000030 MB_ICONASTERISK = 0x00000040 MB_ICONINFORMATION = MB_ICONASTERISK MB_ICONSTOP = MB_ICONHAND MessageBox.call(0, "Text", "Titel", MB_OK | MB_ICONINFORMATION) ---------------------------------- Marvin -- Posted via http://www.ruby-forum.com/.