Posts: 110
Threads: 36
Joined: May 2012
Script makes errors, warnings windows. (also known as PrintEx)
Content Hidden
Code:
#**Module MessageBox
#**Originally maked by A Crying Minister (Whiteflute)
#**Edited & WFRGSS requirement deleting - Narzew
module API
MESSAGEBOX = Win32API.new('user32', 'MessageBoxA', %w(p p p i), 'i').freeze
GETPRIVATEPROFILESTRING = Win32API.new('kernel32', 'GetPrivateProfileStringA',%w(p p p p l p),'l').freeze
end
module MessageBox
MB_OK = 0x0 #
MB_OKCANCEL = 0x1 #
MB_ABORTRETRYIGNORE = 0x2 #
MB_YESNOCANCEL = 0x3 #
MB_YESNO = 0x4 #
MB_RETRYCANCEL = 0x5 #
MB_ICONERROR = 0x10 # エラー
MB_ICONQUESTION = 0x20 # 問い合わせ
MB_ICONWARNING = 0x30 # 警告
MB_ICONINFORMATION = 0x40 # 情報
MB_SYSTEMMODAL = 0x1000 # システムモーダル
MB_TASKMODAL = 0x2000 # タスクモーダル
MB_TOPMOST = 0x040000 # 最前面
MB_FATAL = 0x042010 # 致命的エラー用
MB_WARN = 0x042030 # 警告
IDOK = 1
IDCANCEL = 2
IDABORT = 3
IDRETRY = 4
IDIGNORE = 5
IDYES = 6
IDNO = 7
ERROR_SECTION_NUM = (/^(?:Section)?{?(\d+)}?:/).freeze
ERROR_SECTION = (/^(?:Section)?{?\d+}?:/).freeze
DOUBLE_CRLF = (/\n\n/).freeze
def self.new( message , title , type )
API::MESSAGEBOX.call(0, message, title, type)
end
end
Usage:
MessageBox.new(msg, title, type, see_script)
Nice using.
Skills: Android, Ruby, PHP, Linux