Else

IF-¼­¼ú¹®ÀÌ FALSE·Î Æò°¡µÇ¸é ¼öÇàÇÒ ¸ê·É¾î¸¦ ÁöÁ¤ÇÕ´Ï´Ù. Çϳª ÀÌ»óÀÇ ¸í·É¾î°¡ Á¸ÀçÇϸé, ºí·Ï ¾È¿¡ (È°°ýÈ£) ½Î ³ÖÀ¸½Ê½Ã¿À.

Else

³íÆò

ELSE¸¦ »ç¿ëÇÏ¸é ¹Ù·Î À§ÀÇ IF-¼­¼ú¹®¿¡ ¼ÓÇÕ´Ï´Ù (¿¬°üµË´Ï´Ù). ELSE´Â ¾ðÁ¦³ª À§ÂÊÀ¸·Î °¡Àå °¡±î¿î IF-¼­¼ú¹®¿¡ ¼ÓÇÕ´Ï´Ù. ´Ü, ºí·ÏÀ» »ç¿ëÇÏ¿© ±× ÇàÀ§¸¦ ¹Ù²Û °æ¿ì´Â Á¦¿ÜÇÕ´Ï´Ù.

ELSE ´ÙÀ½¿¡ ¹Ù·Î °°Àº ÁÙ¿¡ ¸í·É¾î Çϳª°¡ µû¶ó¿Ã ¼ö ÀÖ½À´Ï´Ù. ÀÌ°ÍÀº "else if" »ç´Ù¸®¿¡ °¡Àå ¸¹ÀÌ »ç¿ëµË´Ï´Ù (¾Æ·¡ÀÇ ¿¹Á¦¸¦ ÂüÁ¶ÇϽʽÿÀ).

IF ¶Ç´Â ELSE°¡ ÇÑ ÁÙ ÀÌ»óÀ» ¼ÒÀ¯Çϸé, ±×·± ÁÙÀº È°°ýÈ£·Î µÑ·¯ ½Î¾ß ÇÕ´Ï´Ù. ±×·¸Áö¸¸, ÇÑ ÁÙ¸¸ IF ¶Ç´Â ELSE¿¡ ¼ÓÇØ ÀÖ´Ù¸é, È°°ýÈ£´Â ¼±ÅÃÀûÀÔ´Ï´Ù. ¿¹¸¦ µé¾î:

if count > 0  ; ´ÙÀ½ ÁÙ¿¡ °ýÈ£°¡ ÇÊ¿ä ¾ø½À´Ï´Ù. ¿Ö³ÄÇϸé ÇÑ ÁÙ¸¸ Àֱ⠶§¹®ÀÔ´Ï´Ù.
    MsgBox ÇÁ·Î¼¼½º¸¦ ½ÃÀÛÇÏ·Á¸é OK¸¦ ´©¸£½Ê½Ã¿À.
else  ; ¾Æ·¡ ¼½¼Ç¿¡´Â È°°ýÈ£¸¦ ¹Ýµå½Ã µÑ·¯¾ß ÇÕ´Ï´Ù. ¿Ö³ÄÇϸé ÇÑ ÁÙ ÀÌ»óÀ¸·Î ±¸¼ºµÇ¾î Àֱ⠶§¹®ÀÔ´Ï´Ù.
{
    WinClose Untitled - Notepad
    MsgBox Ç׸ñÀÌ Çϳªµµ ¾ø½À´Ï´Ù.
}

One True Brace (OTB) ½ºÅ¸ÀÏÀº ¼±ÅÃÀûÀ¸·Î "else" µÑ·¹¿¡ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ¿¹¸¦ µé¾î:

if IsDone {
    ...
} else if (x < y) {
    ...
} else {
    ...
}

°ü·Ã Ç׸ñ

Blocks ÂüÁ¶. ¶Ç, IF-¸í·É¾î¸¶´Ù ELSE¸¦ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ¿©±â¿¡´Â IfWinActive, IfWinExist, IfMsgBox, IfInString, IfBetween, IfIn, IF, ±×¸®°í IF (expression)°¡ Æ÷ÇԵ˴ϴÙ.

¿¹Á¦

IfWinExist, Untitled - Notepad
{
    WinActivate
    Send This is a test.{Enter}
}
else
{
    WinActivate, Some Other Window
    MouseClick, left, 100, 200
}

if x = 1
    Gosub, a1
else if x = 2 ; "else if" ½ºÅ¸ÀÏ
    Gosub, a2
else IfEqual, x, 3 ; ´ë¾È ½ºÅ¸ÀÏ
{
    Gosub, a3
    Sleep, 1
}
else Gosub, a4  ; Áï, ¸í·É¾î°¡ Çϳª¸¸ ÀÖÀ¸¸é  ELSE¿Í °°Àº ÁÙ¿¡ ÀÖÀ» ¼ö ÀÖ½À´Ï´Ù.
 
; Also OK:
IfEqual, y, 1, Gosub, b1
else {
    Sleep, 1
    Gosub, b2
}