- Content
- Index
- Quick Reference
- ►Usage and Syntax
- Hotkeys
- Hotstrings & auto-replace
- Remapping keys and buttons
- Key List (Keyboard, Mouse, Joystick)
- Scripts
- Variables and Expressions
- Functions
- Labels
- Threads
- Debugging (DBGp) Clients
- ►Objects
- Basic Usage
- Extended Usage
- Custom Objects
- Default Base Object
- Implementation
- Frequently Asked Questions
- Tutorial (quick start)
- Recent Changes
- Script Showcase
- Script Compatibility
- Command and Function Index
- ►Environment
- ClipWait
- EnvGet
- EnvSet
- EnvUpdate
- OnClipboardChange
- SysGet
- ►External Libraries
- DllCall
- NumGet
- NumPut
- RegisterCallback
- StrPut/StrGet
- VarSetCapacity
- ►COM
- ComObjActive
- ComObjArray
- ComObjConnect
- ComObjCreate
- ComObjGet
- ComObjError
- ComObjFlags
- ComObjQuery
- ComObjType
- ComObjValue
- ObjAddRef / ObjRelease
- ►File, Directory and Disk
- Drive
- DriveGet
- DriveSpaceFree
- FileAppend
- FileCopy
- FileCopyDir
- FileCreateDir
- FileCreateShortcut
- FileDelete
- FileEncoding
- FileExist
- FileGetAttrib
- FileGetShortcut
- FileGetSize
- FileGetTime
- FileGetVersion
- FileInstall
- FileMove
- FileMoveDir
- FileOpen
- FileReadLine
- FileRead
- FileRecycle
- FileRecycleEmpty
- FileRemoveDir
- FileSelectFile
- FileSelectFolder
- FileSetAttrib
- FileSetTime
- IfExist/IfNotExist
- IniDelete
- IniRead
- IniWrite
- Loop (files & folders)
- Loop (read file contents)
- SetWorkingDir
- SplitPath
- ►Flow of Control
- #Include/#IncludeAgain
- { ... } (block)
- Break
- Catch
- Continue
- Critical
- Else
- Exit
- ExitApp
- Finally
- For-loop
- Gosub
- Goto
- ►If
- If (traditional)
- If (expression)
- If var [not] between Low and High
- If var is [not] type
- If var [not] in/contains MatchList
- IfExist/IfNotExist
- IfInString/IfNotInString
- IfMsgBox
- IfWinActive/IfWinNotActive
- IfWinExist/IfWinNotExist
- ►Loop
- Loop
- Loop (files & folders)
- Loop (parse a string)
- Loop (read file contents)
- Loop (registry)
- OnExit
- Pause
- Reload
- Return
- SetBatchLines
- SetTimer
- Sleep
- Suspend
- Thread
- Throw
- Try
- Until
- While-loop
- ►Graphical User Interfaces
- FileSelectFile
- FileSelectFolder
- Gui
- Gui control types
- GuiControl
- GuiControlGet
- Gui ListView control
- Gui TreeView control
- IfMsgBox
- Image Handles
- InputBox
- LoadPicture
- Menu
- MenuGetHandle
- MenuGetName
- MsgBox
- OnMessage
- Progress
- SplashImage
- SplashTextOn/SplashTextOff
- Standard Windows Fonts
- Styles for a window/control
- ToolTip
- TrayTip
- ►Maths
- Abs
- Ceil
- EnvAdd (and date math)
- EnvDiv
- EnvMult
- EnvSub (and date diff)
- Exp
- Floor
- Log
- Ln
- Max
- Min
- Mod
- Random
- Round
- SetFormat
- Sqrt
- Sin/Cos/Tan
- ASin/ACos/ATan
- Transform
- ►Mouse and Keyboard
- ►Hotkeys and Hotstrings
- #HotkeyInterval
- #HotkeyModifierTimeout
- #Hotstring
- #If
- #IfTimeOut
- #IfWinActive/Exist
- #InputLevel
- #MaxHotkeysPerInterval
- #MaxThreads
- #MaxThreadsBuffer
- #MaxThreadsPerHotkey
- #MenuMaskKey
- #UseHook
- Hotkey
- ListHotkeys
- Suspend
- #InstallKeybdHook
- #InstallMouseHook
- #KeyHistory
- BlockInput
- Click
- ControlClick
- ControlSend, ControlSendRaw
- CoordMode
- GetKeyName/VK/SC
- GetKeyState
- Key List (Keyboard, Mouse, Joystick)
- KeyHistory
- KeyWait
- Input
- MouseClick
- MouseClickDrag
- MouseGetPos
- MouseMove
- Send, SendRaw, SendInput, SendPlay, SendEvent
- SendLevel
- SendMode
- SetDefaultMouseSpeed
- SetKeyDelay
- SetMouseDelay
- SetNumScrollCapsLockState
- SetStoreCapslockMode
- ►Misc.
- AutoTrim
- Edit
- Func
- IsByRef
- IsFunc
- IsLabel
- IsObject
- ListLines
- ListVars
- OutputDebug
- Transform
- URLDownloadToFile
- VarSetCapacity
- ►Object Types
- Object
- Enumerator Object
- Exception Object
- File Object
- Func Object
- Function Objects
- RegExMatch Object
- ►Process
- Process
- Run/RunWait
- RunAs
- Shutdown
- ►Registry
- Loop (registry)
- RegDelete
- RegRead
- RegWrite
- SetRegView
- ►Screen and Monitor
- ImageSearch
- PixelGetColor
- PixelSearch
- ►Sound
- SoundBeep
- SoundGet
- SoundGetWaveVolume
- SoundPlay
- SoundSet
- SoundSetWaveVolume
- ►String
- Asc
- Chr
- Format
- FormatTime
- IfInString/IfNotInString
- If var [not] in/contains MatchList
- InStr
- Loop (parse a string)
- Ord
- RegEx Quick Reference
- RegExMatch
- RegExReplace
- SetEnv (var = value)
- SetFormat
- Sort
- StringCaseSense
- StringGetPos
- StringLeft/StringRight
- StringLen
- StringLower/StringUpper
- StringMid
- StringReplace
- StringSplit
- StringTrimLeft/StringTrimRight
- StrLen
- StrPut/StrGet
- StrReplace
- StrSplit
- SubStr
- Trim
- ►Window
- ►Controls
- Control
- ControlClick
- ControlFocus
- ControlGet
- ControlGetFocus
- ControlGetPos
- ControlGetText
- ControlMove
- ControlSend/ControlSendRaw
- ControlSetText
- Menu
- PostMessage/SendMessage
- SetControlDelay
- WinMenuSelectItem
- ►Win Groups
- GroupActivate
- GroupAdd
- GroupClose
- GroupDeactivate
- Window Titles
- #WinActivateForce
- DetectHiddenText
- DetectHiddenWindows
- IfWinActive/IfWinNotActive
- IfWinExist/IfWinNotExist
- SetTitleMatchMode
- SetWinDelay
- StatusBarGetText
- StatusBarWait
- WinActivate
- WinActivateBottom
- WinActive
- WinClose
- WinExist
- WinGet
- WinGetActiveStats
- WinGetActiveTitle
- WinGetClass
- WinGetPos
- WinGetText
- WinGetTitle
- WinHide
- WinKill
- WinMaximize
- WinMinimize
- WinMinimizeAll, WinMinimizeAllUndo
- WinMove
- WinRestore
- WinSet
- WinSetTitle
- WinShow
- WinWait
- WinWaitActive, WinWaitNotActive
- WinWaitClose
- ►#Directives
- #AllowSameLineComments
- #ClipboardTimeout
- #CommentFlag
- #ErrorStdOut
- #EscapeChar
- #HotkeyInterval
- #HotkeyModifierTimeout
- #Hotstring
- #If
- #IfWinActive/Exist
- #IfTimeout
- #Include/#IncludeAgain
- #InputLevel
- #InstallKeybdHook
- #InstallMouseHook
- #KeyHistory
- #MaxHotkeysPerInterval
- #MaxMem
- #MaxThreads
- #MaxThreadsBuffer
- #MaxThreadsPerHotkey
- #MenuMaskKey
- #NoEnv
- #NoTrayIcon
- #Persistent
- #SingleInstance
- #UseHook
- #Warn
- #WinActivateForce
Changing MsgBox's Button Names
This is a working example script that uses a timer to change the names of the buttons in a MsgBox dialog. Although the button names are changed, the IfMsgBox command still requires that the buttons be referred to by their original names.
Download This Script | Other Sample Scripts | Home
#SingleInstance SetTimer, ChangeButtonNames, 50 MsgBox, 4, Add or Delete, Choose a button: IfMsgBox, YES MsgBox, You chose Add. else MsgBox, You chose Delete. return ChangeButtonNames: IfWinNotExist, Add or Delete return ; Keep waiting. SetTimer, ChangeButtonNames, off WinActivate ControlSetText, Button1, &Add ControlSetText, Button2, &Delete return