Code: Select all
Color_Primary := "5573B5"
Color_Danger := "BE5A52"
Color_Success := "7CBB5F"
; -------------------------------------------------------------------------------
; ShowMessageBox
; -------------------------------------------------------------------------------
ShowMessageBox(message, stay := 0, color := Color_Primary, interval := 1000) {
MyGui := Gui("-ToolWindow +Border -Caption +AlwaysOnTop")
MyGui.BackColor := color
MyGui.SetFont("s20 cWhite", "Bahnschrift")
MyGui.AddText("Center", message)
MyGui.Show()
if (stay = 0)
SetTimer(() => MyGui.Hide(), interval)
Sleep(1000)
}
When I call
Code: Select all
ShowMessageBox("Task completed", Color_Success, 2000)