- 목차
- 색인
- 오토핫키 소개
- 자습서
- FAQ (자주 묻는 질문)
- 명령어와 함수 인덱스
- 예제 스크립트
- 최근 변경사항
- ►기본적인 사용법과 구문
- 핫키
- 핫스트링 & 자동-교체
- 키와 버튼을 리맵하기
- 키 리스트 (키보드, 마웃, 조이스틱)
- 스크립트
- 변수와 표현식
- 함수
- 디버깅 클라이언트 (DBGp)
- ►객체
- 기본 사용법
- 고급 사용법
- 맞춤 객체
- 기본 베이스 객체
- 객체의 구현
- 객체
- 열거 객체
- 파일 객체
- 함수 객체
- ►AutoHotkey 1.1로 이주하기 (AutoHotkey_L)
- AutoHotkey_L 새 특징
- 스크립트 호환성
- ►환경 관리
- ClipWait
- EnvGet
- EnvSet
- EnvUpdate
- ►고유 코드 상호운용
- DllCall
- NumGet
- NumPut
- RegisterCallback
- StrPut()/StrGet()
- ►COM
- ComObjActive
- ComObjArray
- ComObjConnect
- ComObjCreate
- ComObjGet
- ComObjError
- ComObjFlags
- ComObjQuery
- ComObjType
- ComObjValue
- ObjAddRef / ObjRelease
- ►파일, 디렉토리, 그리고 디스크 관리
- Drive
- DriveGet
- DriveSpaceFree
- FileAppend
- FileCopy
- FileCopyDir
- FileCreateDir
- FileCreateShortcut
- FileDelete
- FileEncoding
- FileGetAttrib
- FileGetShortcut
- FileGetSize
- FileGetTime
- FileGetVersion
- FileInstall
- FileMove
- FileMoveDir
- FileOpen()
- FileReadLine
- FileRead
- FileRecycle
- FileRecycleEmpty
- FileRemoveDir
- FileSelectFile
- FileSelectFolder
- FileSetAttrib
- FileSetTime
- IfExist/IfNotExist
- IniDelete
- IniRead
- IniWrite
- Loop (파일 & 폴더)
- Loop (파일 내용 읽기)
- SetWorkingDir
- SplitPath
- ►실행 흐름
- #Include/#IncludeAgain
- { ... } (block)
- Break
- Catch
- Continue
- Critical
- Else
- Exit
- ExitApp
- Finally
- For-loop
- Gosub
- Goto
- ►If commands
- 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 (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
- ►내장 함수
- Asc
- Chr
- FileExist
- Format
- GetKeyName/VK/SC
- GetKeyState
- InStr
- IsByRef
- IsFunc
- IsLabel
- NumGet
- NumPut
- OnClipboardChange
- OnExit
- OnMessage
- Ord
- RegExMatch
- RegExReplace
- RegisterCallback
- StrLen
- StrPut/StrGet
- StrReplace
- StrSplit
- SubStr
- VarSetCapacity
- WinActive
- WinExist
- ►GUI, MsgBox, InputBox & 기타 대화상자
- FileSelectFile
- FileSelectFolder
- Gui
- Gui control types
- GuiControl
- GuiControlGet
- Gui ListView control
- Gui TreeView control
- IfMsgBox
- InputBox
- Menu
- MsgBox
- OnMessage
- Progress
- SplashImage
- SplashTextOn/SplashTextOff
- ToolTip
- TrayTip
- ►마우스와 키보드
- ►핫키와 핫스트링
- #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
- 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
- ►수학 함수
- Abs
- Ceil
- Exp
- Floor
- Log
- Ln
- Mod
- Random
- Round
- SetFormat
- Sqrt
- Sin/Cos/Tan
- ASin/ACos/ATan
- Transform
- ►화면 관리
- ImageSearch
- PixelGetColor
- PixelSearch
- ►기타 명령어
- #NoTrayIcon
- #SingleInstance
- #Warn
- AutoTrim
- Edit
- ListLines
- ListVars
- OutputDebug
- SysGet
- Transform
- URLDownloadToFile
- VarSetCapacity
- ►프로세스 관리
- Process
- Run/RunWait
- RunAs
- Shutdown
- ►레지스트리 관리
- Loop (registry)
- RegDelete
- RegRead
- RegWrite
- SetRegView
- ►전송 명령어
- SoundBeep
- SoundGet
- SoundGetWaveVolume
- SoundPlay
- SoundSet
- SoundSetWaveVolume
- ►문자열 관리
- Format()
- FormatTime
- IfInString/IfNotInString
- If var [not] in/contains MatchList
- InStr()
- Loop (parse a string)
- 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()
- ►창 관리
- ►콘트롤
- Control
- ControlClick
- ControlFocus
- ControlGet
- ControlGetFocus
- ControlGetPos
- ControlGetText
- ControlMove
- ControlSend/ControlSendRaw
- ControlSetText
- Menu
- PostMessage/SendMessage
- SetControlDelay
- WinMenuSelectItem
- ►창 그룹
- GroupActivate
- GroupAdd
- GroupClose
- GroupDeactivate
- #WinActivateForce
- DetectHiddenText
- DetectHiddenWindows
- IfWinActive/IfWinNotActive
- IfWinExist/IfWinNotExist
- SetTitleMatchMode
- SetWinDelay
- StatusBarGetText
- StatusBarWait
- WinActivate
- WinActivateBottom
- WinClose
- WinGet
- WinGetActiveStats
- WinGetActiveTitle
- WinGetClass
- WinGetPos
- WinGetText
- WinGetTitle
- WinHide
- WinKill
- WinMaximize
- WinMinimize
- WinMinimizeAll, WinMinimizeAllUndo
- WinMove
- WinRestore
- WinSet
- WinSetTitle
- WinShow
- WinWait
- WinWaitActive, WinWaitNotActive
- WinWaitClose
- ►#지시어
- #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
ErrorLevel
명령어의 성공 여부를 알리기 위해 설정되는 내장 변수 입니다 (모든 명령어가 ErrorLevel의 값을 변경하는 것은 아닙니다). 값이 0이면 보통 성공을 나타내고, 다른 값은 보통 실패를 나타냅니다. ErrorLevel의 값을 직접 설정해도 됩니다.
RunWait가 자신이 실행한 프로그램의 종료 코드가 되도록 ErrorLevel를 설정하는 것은 특별히 흥미롭습니다. 대부분의 프로그램은 성공적으로 완료하면 종료 코드를 0으로 산출합니다.
각 쓰레드마다 자신의 ErrorLevel을 보유합니다. 현재 쓰레드가 다른 쓰레드에 의해 인터럽트 되더라도, 원래 쓰레드가 재개하면, 여전히 자신의 원래 ErrorLevel을 보유합니다. 인터럽트 한 쓰레드가 설정한 ErrorLevel이 아니라는 뜻입니다.
주의: 어떤 명령어는 ErrorLevel에 1보다 큰 값을 설정하므로, ErrorLevel이 1인가를 점검하지 말고, 대신에 ErrorLevel이 0이 아닌가를 점검하는 것이 좋습니다.
예제
WinWait, MyWindow, , 1 if ErrorLevel ; 즉, 비어 있지 않거나 0이면. MsgBox, 창이 존재하지 않습니다. else MsgBox, 창이 존재합니다.