1 # This script works on Windows.
2
3 require 'dl/win32'
4
5 MB_OK = 0
6 MB_OKCANCEL = 1
7
8 message_box = Win32API.new("user32",'MessageBoxA', 'ISSI', 'I')
9 r = message_box.call(0, 'ok?', 'error', MB_OKCANCEL)
10
11 case r
12 when 1
13 print("OK!\n")
14 when 2
15 print("Cancel!\n")
16 else
17 p r
18 end