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