¿©ÇàÀ» ½ÃÀÛÇϱâ Àü¿¡, Á¶¾ðÀ» ÇÑ ¸¶µð ÇÒ±î ÇÕ´Ï´Ù.
ÀÌ ÀÚ½À¼¿¡¼ ¿©·¯ºÐÀº ²Ï ¸¹Àº ÅؽºÆ®¿Í Äڵ带 º¸½Ã°Ô µË´Ï´Ù.
¹è¿ì´Â ÈûÀ» Å°¿ì·Á¸é, ÅؽºÆ®¸¦ Àаí Äڵ带 ½ÃÇèÇØ º¾´Ï´Ù.
´ÙÀ½ ±× Äڵ带 ¿¬±¸ÇØ º¸½Ã±â ¹Ù¶ø´Ï´Ù.
ÀÌ ÆäÀÌÁö¿¡¼ ´ëºÎºÐÀÇ ¿¹Á¦¸¦ º¹»çÇØ ºÙ¿© ³ÖÀ» ¼ö ÀÖ½À´Ï´Ù.
Àß ¸ð¸£°Ú´Ù¸é, ´Ù½Ã ÀÐ¾î º¸½Ê½Ã¿À.
AutoHotkey (AHK)ÀÇ »ç¿ë¹ýÀ» ¹è¿ì±â¿¡ ¾Õ¼, ³»·Á ¹Þ¾Æ¾ß ÇÏ°Ú½À´Ï´Ù. ³»·Á ¹Þ¾ÒÀ¸¸é, ¼³Ä¡ÇØ¾ß °ÚÁö¿ä. ±×·¯³ª ±×°ÍÀº ¿øÇÏ´Â ¹öÀüÀÌ ¹«¾ùÀΰ¡¿¡ µû¶ó ´Þ¶óÁý´Ï´Ù. ÀÌ Áöħ¼¿¡¼´Â ¼³Ä¡±â¸¦ »ç¿ëÇÏ°Ú½À´Ï´Ù. °¡Àå ½±°Ô ¼³Ä¡ÇÒ ¼ö ÀÖÀ¸´Ï±î¿ä.
µ¿¿µ»ó Áö½Ã:
Frankie's "Install and Hello World"
http://www.autohotkey.com/forum/viewtopic.php?t=77674
¿ÀÅäÇÖÅ°¸¦ ¼³Ä¡ÇßÀ¸¸é, ¹º°¡ ÀÏÀ» ½ÃÅ°°í ½Í°ÚÁö¿ä. ¿ÀÅäÇÖÅ°°¡ ¸¶¹ýÀº ¾Æ´Õ´Ï´Ù. ¿ì¸® ¸ðµÎ°¡ ±×·¸±â¸¦ ¹Ù¶óÁö¸¸, ½ÇÁ¦·Î´Â ¾Æ´Õ´Ï´Ù. ±×·¡¼ ¹«½¼ ÀÏÀ» Ç϶ó°í Áö½ÃÇÒ ÇÊ¿ä°¡ ÀÖ½À´Ï´Ù. ÀÌ·± ÀýÂ÷¸¦ "½ºÅ©¸³ÆÃ(Scripting)"À̶ó°í ºÎ¸¨´Ï´Ù.
ÀÌÁ¦ ½ºÅ©¸³Æ®¸¦ ¸¸µé¾úÀ¸¹Ç·Î, ÆÄÀÏ ¾È¿¡ ³»¿ëÀ» ä¿ö ³Ö¾î¾ß ÇÏ°Ú½À´Ï´Ù.
¸ðµç ³»Àå ¸í·É¾î¿Í ÇÔ¼ö ±×¸®°í º¯¼ö ¸ñ·ÏÀº
section 5¿¡¼ º¸½Ç ¼ö ÀÖ½À´Ï´Ù.
´ÙÀ½Àº ÇÖÅ°¸¦ ´ã°í ÀÖ´Â ¾ÆÁÖ °£´ÜÇÑ ½ºÅ©¸³Æ®ÀÔ´Ï´Ù. ±× ÇÖÅ°°¡ ´¸®¸é Send ¸í·É¾î¸¦ »ç¿ëÇÏ¿© ÅؽºÆ®¸¦ ŸÀÚÇÕ´Ï´Ù.
^j:: Send, ³ªÀÇ Ã¹ ¹ø° ½ºÅ©¸³Æ® Return
³ªÁß¿¡ ´õ ±íÀÌ µé¾î°¡ º¸°Ú½À´Ï´Ù. ±× ¶§±îÁö, ¿©±â¿¡¼´Â À§ÀÇ Äڵ带 ¼³¸íÇÕ´Ï´Ù.
- ù ÁÙ. ^j::
°¡ ¹Ù·Î ÇÖÅ°ÀÔ´Ï´Ù.
^
´Â CTRLÀ» ÀǹÌÇÏ°í, j
´Â ±âÈ£¹®ÀÚ jÀÔ´Ï´Ù.
::
ÀÇ ¿ÞÂÊ¿¡ ÀÖ´Â °ÍÀº ¸ðµÎ ´©¸¦ ÇÊ¿ä°¡ ÀÖ´Â Å°µéÀÔ´Ï´Ù.
- µÑ° ÁÙ. Send, My First Script
´Â Å°µéÀ» Àü¼ÛÇÏ´Â(SEND) ¹ýÀ» º¸¿©ÁÝ´Ï´Ù.
SEND
´Â ¸í·É¾îÀÌ°í, ½°Ç¥(,) ´ÙÀ½¿¡ ¿À´Â °ÍµéÀÌ ¸ðµÎ ŸÀڵ˴ϴÙ.
- ¼Â° ÁÙ. Return
. ReturnÀº ¾ÕÀ¸·Î °¡Àå ¸¹ÀÌ Á¢ÇÏ°Ô µÇ½Ç °Ì´Ï´Ù.
¹®ÀÚ ±×´ë·Î Äڵ带 ¸ØÃä´Ï´Ù. ¾Æ·¡·Î ´õ ÀÌ»ó ÁøÇàÇÏÁö ¾Ê½À´Ï´Ù.
ÀÌ·¸°Ô ÇÏ¸é ½ºÅ©¸³Æ®¿¡ ¸¹Àº ³»¿ëÀÌ ÀÖÀ» ¶§ ¹®Á¦¸¦ ÇÇÇÒ ¼ö ÀÖ½À´Ï´Ù.
ºñµð¿À Áö½Ã:
Frankie's "Install and Hello World"
http://www.autohotkey.com/forum/viewtopic.php?t=77674
Äڵ带 ¸¸µé ¶§, ¿©·¯ ¸í·É¾îµéÀ» ÇÑ ÁÙ¿¡ ¶Ç´Â ÇÑ ¸í·É¾î ¾È¿¡ ´Ù¸¥ ¸í·É¾î¸¦ ¹èÄ¡ÇÏ°í ½ÍÀº À¯È¤¿¡ ºüÁú °æ¿ì°¡ ¸¹À» °ÍÀÔ´Ï´Ù. Àý´ë ±×·¸°Ô ÇÏÁö ¸¶½Ê½Ã¿À. ¼½¼Ç 5¿¡¼ ¿Ö ¿¹»óÇÑ´ë·Î ÀÛµ¿ÇÏÁö ¾Ê´ÂÁö ±×¸®°í ´ë½Å¿¡ ¾î¶»°Ô Çϸé ÁÁÀºÁö ¸»¾¸µå¸®°Ú½À´Ï´Ù.
¿Â¶óÀÎ ¸µÅ©:
¹®¼
¸í·É¾î ¸®½ºÆ®
ÇÔ¼ö
º¯¼ö
ÇÖÅ°¶õ ¹«¾ùÀΰ¡? ÇÖÅ°´Â ¼Õ±æ¿¡ ¹ÝÀÀÇÏ´Â Å°ÀÔ´Ï´Ù. ... ³ó´ãÀÔ´Ï´Ù. ÇÖÅ°´Â »ç¿ëÀÚ°¡ Å°º¸µå¸¦ ´·¯ ¾î¶² ÇàÀ§¸¦ Ã˹߽ÃÅ°´Â Å° ¶Ç´Â Å°ÀÇ Á¶ÇÕÀÔ´Ï´Ù.
ÇÖ½ºÆ®¸µÀ̶õ ¹«¾ùÀΰ¡? ÇÖ½ºÆ®¸µÀº ÁַΠŸÀÚÇÏ´Â µ¿¾È ¾àÀÚ¸¦ È®´ëÇÏ´Â µ¥ »ç¿ëµË´Ï´Ù (ÀÚµ¿-ġȯ). ¶Ç ½ºÅ©¸³Æ® ÇàÀ§¸¦ Ã˹߽ÃÅ°´Â µ¥¿¡µµ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
´ÙÀ½Àº ÇÖÅ°ÀÔ´Ï´Ù:
^j:: Send, ³ªÀÇ Ã¹ ¹ø° ½ºÅ©¸³Æ® Return
´ÙÀ½Àº ÇÖ½ºÆ®¸µÀÔ´Ï´Ù:
::ftw::Free the whales
µÎ ¿¹Á¦ »çÀÌÀÇ Â÷ÀÌ´Â ÇÖÅ°°¡ CTRL & J¸¦ ´©¸¦ ¶§ Ã˹ߵÇÁö¸¸ ÇÖ½ºÆ®¸µÀº "ftw"¸¦ ŸÀÚÇÏ¸é ¹Ù·Î "Free the whales"·Î ġȯÇÕ´Ï´Ù.
"±×·¡¼, Á¤È®ÇÏ°Ô ¾î¶»°Ô ÇÖÅ°¸¦ ¸¸µå´Â°¡?"
ÁÁÀº Áú¹®ÀÔ´Ï´Ù. ÇÖÅ°´Â ÇÑ ½ÖÀÇ ::·Î ¸¸µé ¼ö ÀÖ½À´Ï´Ù. Å°³ª Å° Á¶ÇÕÀÇ ¿À¸¥ÂÊ¿¡ ::
ÀÌ ÀÖ¾î¾ß ÇÕ´Ï´Ù. ±×¸®°í ³»¿ëÀº ¾Æ·¡¿¡ ÀÖ¾î¾ß ÇÏ°í, ¹Ù·Î µû¶ó¼ ¾Æ·¡¿¡ Return
ÀÌ ÀÖ¾î¾ß ÇÕ´Ï´Ù.
ÁÖÀÇ: ¿¹¿Ü°¡ ÀÖÁö¸¸, ±×·± °ÍµéÀº È¥¶õ¸¸ °¡Áß ½Ãų »ÓÀÔ´Ï´Ù. ±×·¡¼ ±×·± °ÍµéÀº ÀÌ ÀÚ½À¼¿¡¼ ´Ù·çÁö ¾Ê½À´Ï´Ù. Àû¾îµµ Áö±ÝÀº ¾Æ´Õ´Ï´Ù.
esc:: MsgBox Escape!!!! Return
ÇÖ ½ºÆ®¸µÀº ÇÑ ½ÖÀÇ ::·Î ¸¸µì´Ï´Ù. ±× »çÀÌ¿¡ ÅؽºÆ® ±³Ã¼¸¦ Ã˹ßÇÏ°í ½ÍÀº ÅؽºÆ®¸¦ ³Ö½À´Ï´Ù. ¹Ý¸é¿¡ ŸÀÚµÈ ÅؽºÆ®¸¦ ´ë½ÅÇÒ ÅؽºÆ®´Â µÎ ¹ø° :: ½ÖÀÇ ¿À¸¥ÂÊ¿¡ ¹èÄ¡ÇÕ´Ï´Ù.
ÇÖ½ºÆ®¸µÀº À§¿¡ ¾ð±ÞÇÑ ¹Ù¿Í °°ÀÌ ½ºÅ©¸³Æ®µÈ ÇàÀ§¸¦ Ã˹ßÇÒ ¼ö ÀÖ½À´Ï´Ù. ÇÖÅ°¿Í ¶È °°ÀÌ "¸ÚÁö°Ô ÀÏÀ» ÇϰŶó"¿Í °°Àº ¸¶¹ýÀÇ ÁÖ¹®ÀÔ´Ï´Ù.
::btw:: MsgBox You typed "btw". Return
¾Ë¾Æ¾ß ÇÒ ¸ÚÁø ÀÏÀº °¢ ÇÖÅ°, ÇÖ ½ºÆ®¸µ, ¶óº§ ±×¸®°í ¾ÆÁ÷ ¾ð±ÞÇÏÁö ¾ÊÀº ¸¹Àº °Íµé¸¶´Ù ¸¹Àº ÁÙÀÇ Äڵ带 °¡Áú ¼ö ÀÖ´Ù´Â °ÍÀÔ´Ï´Ù.
^j:: MsgBox Wow! MsgBox this is Run, Notepad.exe winactivate, Untitled - Notepad WinWaitActive, Untitled - Notepad send, 7 lines{!}{enter} sendinput, inside the ctrl{+}j hotkey Return
½Éº¼ | ¼³¸í |
---|---|
# | Win (À©µµ¿ìÁî ·Î°í Å°) |
! | Alt |
^ | Control |
+ | Shift |
& | ¾ÚÆÛ¼¾µå´Â µÎ °³ÀÇ Å° ¶Ç´Â ¸¶¿ì½º ¹öÆ° »çÀÌ¿¡ »ç¿ëµÇ¾î ¸ÂÃã ÇÖÅ°·Î Á¶ÇÕÇØ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. |
(¿ÏÀüÇÑ ½Éº¼ ¸ñ·ÏÀº ÇÖÅ° ÆäÀÌÁö¸¦ ÂüÁ¶ÇÕ´Ï´Ù)
Ãß°¡·Î, ´ÙÀ½Àº ÇÖÅ°ÀÇ ¿ÞÂÊ¿¡ »ç¿ëÇÒ ¼ö ÀÖ´Â ¸ðµç/°ÅÀÇ ´ëºÎºÐÀÇ ÇÖÅ° À̸§ ¸ñ·ÏÀÔ´Ï´Ù:
KeyList.htm
µÎ °³ÀÇ Å°¸¦ (¿ÀÁ÷ µÎ °³±îÁö¸¸) Á¶ÇÕÇØ Á¤ÀÇÇÒ ¼ö ÀÖ½À´Ï´Ù (Á¶À̽ºÆ½ ¹öÆ° Á¦¿Ü). ±× »çÀÌ¿¡ &¸¦ »ç¿ëÇÏ¸é µË´Ï´Ù. ¾Æ·¡ÀÇ ¿¹Á¦¿¡¼, Numpad0¸¦ ´©¸¥ ´ÙÀ½ µÎ ¹ø° Å°¸¦ ´·¯¼ ÇÖÅ°¸¦ Ã˹߽ÃÄÑ º¸°Ú½À´Ï´Ù:
Numpad0 & Numpad1:: MsgBox Numpad0À» ´©¸£°í ÀÖ´Â µ¿¾È Numpad1¸¦ ´·¶½À´Ï´Ù. Return Numpad0 & Numpad2:: Run Notepad Return
±×·¯³ª ÀÌÁ¦ ÇÖ½ºÆ®¸µÀº ÇÖÅ°°¡ ±×·± °Íó·³ ¸ÚÁø ¼ö½ÄÅ°µéÀÌ ÀÖÀ»±î ±Ã±ÝÇÏ½Ç °Ì´Ï´Ù. ¹°·Ð ÀÖ½À´Ï´Ù!
ÇÖ½ºÆ®¸µ ¼ö½ÄÅ°´Â ù ¹ø° :: ½Ö »çÀÌ¿¡ µé¾î°©´Ï´Ù. ´ÙÀ½°ú °°ÀÌ:
:*:ftw::Free the whales
ÇÖÅ°¿Í ÇÖ½ºÆ®¸µ ¼ö½ÄÅ°¿¡ °üÇÑ ´õ ÀÚ¼¼ÇÑ Á¤º¸¿Í ¿¹Á¦´Â ´ÙÀ½À» ÂüÁ¶ÇÕ´Ï´Ù:
ÇÖÅ°
ÇÖ½ºÆ®¸µ
Á¾Á¾ ÇÖÅ°³ª ÇÖ½ºÆ®¸µÀÌ Æ¯Á¤ â¿¡¼¸¸ ÀÛµ¿ÇßÀ¸¸é (¶Ç´Â ÀÛµ¿ÇÏÁö ¸»¾ÒÀ¸¸é) ÇÏ°í ¹Ù¶ö °æ¿ì°¡ ÀÖ½À´Ï´Ù. ¾Õ¿¡ #¸¦ µÎ°í ´ÙÀ½ÀÇ È¯»óÀûÀÎ ¸í·É¾î¸¦ »ç¿ëÇÏ¸é µË´Ï´Ù.
#IfWinActive
#IfWinExist
(±â¼úÀûÀ¸·Î "Áö½Ã¾î"¶ó°í ºÒ¸®¿ì´Â) ÀÌ Æ¯º°ÇÑ ¸í·É¾îµéÀº ¹®¸ÆÀ»-°¨ÁöÇÏ´Â ÇÖÅ°¿Í ÇÖ½ºÆ®¸µÀ» ¸¸µì´Ï´Ù. ±×³É â Á¦¸ñÀ» ÁöÁ¤ÇÏ¸é µË´Ï´Ù. ±×·¯³ª ¾î¶² °æ¿ì´Â HWND³ª ±×·ì ¶Ç´Â Ŭ·¡½º¸¦ ÁöÁ¤ÇÏ°í ½ÍÀ» °æ¿ìµµ ÀÖ½À´Ï´Ù. ±×·± °ÍµéÀº Á» °í±Þ ÁÖÁ¦À̹ǷΠ´ÙÀ½¿¡¼ ´õ ±í°Ô ´Ù·ì´Ï´Ù: #IfWinActive.
#IfWinActive Untitled - Notepad #space:: MsgBox ³ëÆ®Æе忡¼ Win+Spacebar¸¦ ´·¶½À´Ï´Ù. Return #IfWinActive
¹®¸Æ °¨Áö¸¦ ²ô·Á¸é, #IfWin ¸í·É¾î´Â ÁöÁ¤Ç쵂 ±×ÀÇ ¸ðµç ¸Å°³º¯¼ö¸¦ ºó ä·Î µÎ¸é µË´Ï´Ù. ¿¹¸¦ µé¾î:
; Notepad #IfWinActive untitled - Notepad !q:: MsgBox, ³ëÆ®Æе忡¼ Alt ¿Í Q¸¦ ´·¶½À´Ï´Ù. Return #IfWinActive ; Untitled - Notepad°¡ ¾Æ´Ñ ¸ðµç â !q:: MsgBox, ¾î¶² âÀÎÁö´Â ¸ð¸£Áö¸¸ Alt¿Í Q¸¦ ´·¶½À´Ï´Ù. Return
#IfWin ¸í·É¾î°¡ ²¨Á® ÀÖÀ¸¸é (¶Ç´Â ½ºÅ©¸³Æ® ¾È¿¡¼ ÀüÇô »ç¿ëµÇÁö ¾ÊÀ¸¸é), ¸ðµç ÇÖÅ°¿Í ÇÖ½ºÆ®¸µÀº ¸ðµç â¿¡ ¹ÝÀÀÇÕ´Ï´Ù.
#IfWin ¸í·É¾î´Â À§Ä¡¿¡ ¿µÇâÀ» ¹ÌĨ´Ï´Ù: ¹°¸®ÀûÀ¸·Î ÀÌ ¸í·É¾î ¾Æ·¡¿¡ ÀÖ´Â ¸ðµç ÇÖÅ°¿Í ÇÖ½ºÆ®¸µÀº ¸ðµÎ ¿µÇâÀ» ¹Þ½À´Ï´Ù.
; Notepad #IfWinActive ahk_class Notepad #space:: MsgBox, ³ëÆ®Æе忡¼ Win+Spacebar¸¦ ´·¶½À´Ï´Ù. Return ::msg::You typed msg in Notepad #IfWinActive ; MSPaint #IfWinActive untitled - Paint #space:: MsgBox, MSPaint¿¡¼ Win+Spacebar¸¦ ´·¶½À´Ï´Ù! Return ::msg::You typed msg in MSPaint! #IfWinActive
´õ ±íÀº Á¤º¸°ú ºñ½ÁÇÑ ¸í·É¾îµéÀ» º¸·Á¸é, ´ÙÀ½À» ÂüÁ¶ÇÕ´Ï´Ù:
#IfWinActive
¾î¶² ÀÌÀ¯·Î ÀÌ·± »ý°¢ÀÌ µå½ÇÁö ¸ð¸£°Ú½À´Ï´Ù. ±×·¡¼, ¸íÈ®ÇÏ°Ô ¹àÇô µÓ´Ï´Ù: ¿ÀÅäÇÖÅ°´Â ÆÄÀÏ Çϳª´ç ¾ó¸¶µçÁö ¸¹Àº ÇÖÅ°¿Í ÇÖ½ºÆ®¸µÀ» °¡Áú ¼ö ÀÖ½À´Ï´Ù. 1À̵ç 3253À̵ç (±× ÀÌ»óÀ̵ç) »ó°ü¾ø½À´Ï´Ù.
#i:: run, http://www.google.com/ Return ^p:: run, notepad.exe Return ~j:: send, ack Return :*:acheiv::achiev ::achievment::achievement ::acquaintence::acquaintance :*:adquir::acquir ::aquisition::acquisition :*:agravat::aggravat :*:allign::align ::ameria::America
À§ÀÇ Äڵ带 ¿Ïº®ÇÏ°Ô ¹Þ¾ÆµéÀÏ ¼öÀÖ´Â ´ÙÁß ÇÖÅ°¿Í ´ÙÁß ÇÖ½ºÆ®¸µÀÔ´Ï´Ù. ¸ðµÎ°¡ Çϳª·Î ¹¶¶×±×·ÁÁø ÇູÇÑ ½ºÅ©¸³Æ® ÆÄÀÏÀ̳׿ä.
::btw::By the way ; EndChar¸¦ ´©¸£¸é ¹Ù·Î "btw"¸¦ "By the way"·Î ±³Ã¼ÇÕ´Ï´Ù. :*:btw::By the way ; "btw"¸¦ "By the way"·Î ¹Ù²ß´Ï´Ù. EndChar°¡ ÇÊ¿ä ¾ø½À´Ï´Ù. ^n:: ; Ctrl & n Hotkey run, notepad.exe ; Ctrl & nÀ» ´©·Á¸é ¹Ù·Î notepad.exe¸¦ ½ÇÇàÇÕ´Ï´Ù Return ; ÇÖÅ°°¡ ³¡³³´Ï´Ù. ÀÌ ¾Æ·¡ÀÇ ÄÚµå´Â ½ÇÇàµÇÁö ¾Ê½À´Ï´Ù. ^b:: ; Ctrl & b Hotkey send, {ctrl down}c{ctrl up} ; ¼±ÅÃµÈ ÅؽºÆ®¸¦ º¹»çÇÕ´Ï´Ù. ^cµµ »ç¿ëÇÒ ¼ö ÀÖÁö¸¸, ÀÌ ¹æ¹ýÀÌ ´õ ¾ÈÀüÇÕ´Ï´Ù. SendInput, [b]{ctrl down}v{ctrl up}[/b] ; ¼±ÅÃµÈ ÅؽºÆ®¸¦ bbcode (forum) Bold ÅÂ±× ¾È¿¡ ½Î ³Ö½À´Ï´Ù. Return ; ÇÖÅ°°¡ ³¡³³´Ï´Ù. ÀÌ ¾Æ·¡ÀÇ ÄÚµå´Â ½ÇÇàµÇÁö ¾Ê½À´Ï´Ù.
±×·¡¼ ÀÌÁ¦ Å°µéÀ» ÇÁ·Î±×·¥À¸·Î Àü¼Û(ŸÀÚ)Çϱâ·Î °áÁ¤ÇÕ´Ï´Ù.
Send ¸í·É¾î¸¦ »ç¿ëÇÏ¸é µË´Ï´Ù.
¹®ÀÚ ±×´ë·Î Å°µéÀ» Àü¼ÛÇÕ´Ï´Ù. ¸¶Ä¡ Å°¸¦ ŸÀÚÇϰųª ´©¸¥ °Íó·³ Èä³» ³À´Ï´Ù.
´õ ±í°Ô µé¾î°¡±â Àü¿¡, ¸ÕÀú ¾à°£ÀÇ ÀϹÝÀûÀÎ ¹®Á¦µéÀ» ´Ù·ì´Ï´Ù:
ÇÖŰó·³, Send¿¡µµ Ư¼öÇÑ Å°°¡ ÀÖ½À´Ï´Ù. ¾ÆÁÖ ¸¹½À´Ï´Ù.
´ÙÀ½Àº °¡Àå ¸¹ÀÌ »ç¿ëÇÏ´Â ½Éº¼ ³× °¡ÁöÀÔ´Ï´Ù:
!: ALT Å°¸¦ Àü¼ÛÇÕ´Ï´Ù. ¿¹¸¦ µé¾î, Send This is text!a´Â "This is text" Å°µéÀ» ´©¸¥ ´ÙÀ½ ALT+a¸¦ ´©¸¥ °Í°ú °°½À´Ï´Ù. ÁÖÀÇ: !A ´Â ´Ù¸¥ ÇÁ·Î±×·¥¿¡¼´Â !a¿Í ÀüÇô ´Ù¸¥ È¿°ú¸¦ ³À´Ï´Ù. ÀÌ°ÍÀº !A°¡ ALT+SHIFT+A¸¦ ´©¸¥ °ÍÀÎ ¹Ý¸é !a´Â ALT+a¸¦ ´©¸¥ °ÍÀ̱⠶§¹®ÀÔ´Ï´Ù. Àß ¸ð¸£°Ú´Ù¸é, ¼Ò¹®ÀÚ¸¦ »ç¿ëÇϽʽÿÀ.
+: SHIFT Å°¸¦ Àü¼ÛÇÕ´Ï´Ù. ¿¹¸¦ µé¾î, Send +abC ´Â ÅؽºÆ® "AbC"¸¦ Àü¼ÛÇÏ°í, Send !+a´Â ALT+SHIFT+a¸¦ ´©¸¨´Ï´Ù.
^: CONTROL (Ctrl) Å°¸¦ Àü¼ÛÇÕ´Ï´Ù. ¿¹¸¦ µé¾î, Send ^!a´Â CTRL+ALT+a¸¦ ´©¸¥ °Í°ú °°°í, Send ^{Home}Àº CONTROL+HOMEÀ» Àü¼ÛÇÕ´Ï´Ù. ÁÖÀÇ: ^A´Â ¾î¶² ÇÁ·Î±×·¥¿¡¼ ^a¿Í ÀüÇô ´Ù¸¥ È¿°ú¸¦ ³À´Ï´Ù. ÀÌ°ÍÀº ^A°¡ CONTROL+SHIFT+A¸¦ ´©¸¥ °ÍÀÌ°í ^a´Â CONTROL+a¸¦ ´©¸¥ °ÍÀ̱⠶§¹®ÀÔ´Ï´Ù. Àß ¸ð¸£°Ú´Ù¸é, ¼Ò¹®ÀÚ¸¦ »ç¿ëÇϽʽÿÀ.
#: WIN Å°¸¦ Àü¼ÛÇÕ´Ï´Ù (À©µµ¿ìÁî ·Î°í°¡ ±×·ÁÁø Å°) ±×·¯¹Ç·Î Send #e´Â À©µµ¿ìÁî Å°¸¦ ´©¸¥ ´ÙÀ½ ±âÈ£ "e"¸¦ Àü¼ÛÇÕ´Ï´Ù.
´ÙÀ½ µÎ ¹®´Ü¿¡¼ Àü¼Û ÆäÀÌÁö¿¡ °üÇÑ Å×ÀÌºí¿¡ °üÇÏ¿© ¾ð±ÞÇÕ´Ï´Ù.
ÁÖÀÇ:
ÀÌ Å×À̺íÀº ÇÖÅ°¿¡ Àû¿ëµÇÁö ¾Ê½À´Ï´Ù. ÇÖÅ°¸¦ ¸¸µé ¶§ CTRL ¶Ç´Â ENTER (¶Ç´Â ±âŸ ¾î¶² Å°À̵ç) {} ¾È¿¡ ½Î ³ÖÁö ¸øÇÑ´Ù´Â ¶æÀÔ´Ï´Ù.
; ÇÖÅ°¸¦ ¸¸µé ¶§... ; À߸øµÊ {LCtrl}:: send, AutoHotkey Return ; ¿Ã¹Ù¸§ LCtrl:: send, AutoHotkey Return
À§ÀÇ °Å´ëÇÑ Å×ÀÌºí¿¡ ¾ÆÁÖ ¸¹Àº Ư¼ö Å°µéÀÌ AHK¿¡ ³»ÀåµÇ¾î ÀÖ´Â °ÍÀ» º¼ ¼ö ÀÖ½À´Ï´Ù. ¿¹¸¦ µé¾î: {enter}
±×¸®°í {space}
.
¸¹Àº »ç¶÷µéÀÌ È°°ýÈ£°¡ ±×³É Àç¹Ì·Î ¹èÄ¡µÇ¾î ÀÖ´Ù°í »ý°¢ÇÕ´Ï´Ù. ±×·¯³ª »ç½Ç ²À ÇÊ¿äÇÕ´Ï´Ù. ±×·¸°Ô ÇØ¾ß AHK°¡ {!}
ÀÌ "´À³¦Ç¥"ÀÏ »Ó "Alt Å°¸¦ ´©¸£¶ó"´Â ¶æÀÌ ¾Æ´ÔÀ» ÀÌÇØÇÕ´Ï´Ù.
±×·¡¼ send ÆäÀÌÁö¿¡ ÀÖ´Â Å×À̺íÀ» ²À ¾Ï±âÇÏ½Ã°í °ýÈ£¸¦ Á¦ ÀÚ¸®¿¡ ¹èÄ¡ÇϽʽÿÀ.
; !°¡ {} ¾È¿¡ ÀÖ´Â °Í¿¡ ÁÖ¸ñÇϽʽÿÀ. ±×·¸Áö ¾ÊÀ¸¸é AHK°¡ ; ALT Å°¸¦ ´·¯ ¹ö¸®±â ¶§¹®ÀÔ´Ï´Ù. send, This text has been typed{!}
; À§¿Í °°Áö¸¸, ÀÌ ¹ø¿¡´Â ENTER Å°ÀÔ´Ï´Ù. AHK´Â "enter"¸¦ ŸÀÚÇØ ¹ö¸³´Ï´Ù... ; ... {} ¾È¿¡ ½Î¿© ÀÖÁö ¾Ê´Ù¸é ¸»ÀÔ´Ï´Ù. send, Multiple enter lines have enter been sent. ; À߸øµÊ send, Multiple{enter}lines have{enter}been sent. ; ¿Ã¹Ù¸§
{}'s.
¿¡¼ Á¡) ; À§¿¡ ¾ð±ÞÇÑ Å×ÀÌºí¿¡ ¾ø´Â ±âÈ£³ª ´Ü¾îµéÀ» µû·Î °ýÈ£¿¡ ½Î ³ÖÁö ¸¶½Ê½Ã¿À. send, {a} ; À߸øµÊ send, {b} ; À߸øµÊ send, {c} ; À߸øµÊ send, {a}{b}{c} ; À߸øµÊ send, {abc} ; À߸øµÊ send, abc ; ¿Ã¹Ù¸§
; ´ÙÀ½Àº Å° Çϳª¸¦ ´©¸§°ú µ¿½Ã¿¡ ¶Ç´Ù¸¥ Å° (¶Ç´Â Å°µé)À» ´©¸£´Â ¹æ¹ýÀÔ´Ï´Ù. ; ÇÑ°¡Áö ¹æ¹ýÀÌ ÀÛµ¿ÇÏÁö ¾ÊÀ¸¸é, ´Ù¸¥ ¹æ¹ýÀ» ½ÃµµÇØ º¸½Ê½Ã¿À. send, ^s ; µÑ ´Ù CTRL+s¸¦ Àü¼ÛÇÕ´Ï´Ù. send, {ctrl down}s{ctrl up} ; µÑ ´Ù CTRL+s¸¦ Àü¼ÛÇÕ´Ï´Ù. Send, {ctrl down}c{ctrl up} Send, {b down}{b up} Send, {TAB down}{TAB up} Send, {Up down} ; À§ È»ìÇ¥ Å°¸¦ ´©¸¨´Ï´Ù. Sleep, 1000 ; ÀÏ ÃÊ µ¿¾È ´©¸£°í ÀÖ½À´Ï´Ù. Send, {Up up} ; À§ È»ìÇ¥ Å°¸¦ ¶Á´Ï´Ù.
send, ( ù ¹ø° ÁÙ µÎ ¹ø° ÁÙ ¿øÇÏ´Â ¸¸Å ÁÙÀ» ¹èÄ¡ÇÒ ¼ö ÀÖ½À´Ï´Ù. )
ÁÖÀÇ: ´Ù¾çÇÑ ÇüÅÂÀÇ Àü¼Û ¹æ¹ýÀÌ ÀÖ½À´Ï´Ù.
°¢ÀÚ µû·Î Ưº°ÇÑ Æ¯Â¡ÀÌ ÀÖ½À´Ï´Ù.
ÀÌ Áß¿¡ Çϳª·Î ¿©·¯ºÐÀÇ Çʿ並 ÃæÁ·ÇÏÁö ¸øÇϸé, ¶Ç´Ù¸¥ Á¾·ùÀÇ Àü¼Û ÇüŸ¦ ½ÃµµÇØ º¾´Ï´Ù.
±×³É ¸í·É¾î À̸§À» "send"¿¡¼ "sendPlay" ¶Ç´Â ¿øÇÏ´Â ¾Æ¹«°ÍÀ̳ª ½ÃµµÇØ º¾´Ï´Ù.
´ÙÀ½Àº ÅؽºÆ®¸¦ Àü¼ÛÇÏ´Â °¡Àå ÈçÇÑ ¹æ¹ýÀÔ´Ï´Ù:
Send
SendRaw
SendInput
SendPlay
SendEvent
°¢ÀÚ ¾î¶² ÀÏÀ» ÇÏ´ÂÁö¿¡ °üÇÑ ´õ ÀÚ¼¼ÇÑ Á¤º¸´Â ¿©±â¸¦ ÀÐ¾î º¸½Ê½Ã¿À.
Áß¿äÇÕ´Ï´Ù!
¸¹Àº °ÔÀÓÀº, ƯÈ÷ Çö´ëÀÇ °ÔÀÓÀº, ¼ÓÀÌ´Â °ÍÀ» ¹æÁöÇÏ´Â ±â´ÉÀÌ ÀÖ½À´Ï´Ù.
¿¹¸¦ µé¾î, ÀÌ·± Á¾·ùÀÇ °ÔÀÓÀ¸·Î´Â GameGuard, Hackshield, PunkBuster, µîµîÀÌ ÀÖ½À´Ï´Ù.
°ÔÀÓÀÌ ¼ÓÀÓ ¹æÁö ½Ã½ºÅÛÀÌ ÀÖ°í ÇÖÅ°¿Í ÇÖ½ºÆ®¸µ ±×¸®°í send ¸í·É¾î°¡ ÀÛµ¿ÇÏÁö ¾Ê´Â´Ù¸é, ¾ÈŸ±î¿î ÀÏÀÔ´Ï´Ù.
ÀÌ·± ½Ã½ºÅÛÀ» ¿ìȸÇÏ´Â ÀÏÀº °ÔÀÓ»çÀÇ Á¤Ã¥À» À§¹ÝÇÏ´Â °ÍÀÌ¸ç ±×·¯¸é ¿©·¯ºÐÀº Á¦¸í ´çÇÒ ¼ö ÀÖ½À´Ï´Ù. ÇØ°áÃ¥Àº ´ë´ÜÈ÷ º¹ÀâÇÕ´Ï´Ù.
¾î¶² °ÔÀÓ¿¡¼´Â ÀÛµ¿ÀÇ ±âȸ¸¦ ³ôÀÏ ¼ö ÀÖ´Â ¹æ¹ýÀÌ ÀÖÁö¸¸, ¸¶¹ýÀÇ "´çÀå °ÔÀÓ¿¡¼ ÀÛµ¿Ç϶ó" ¹öÆ°Àº ¾ø½À´Ï´Ù.
±×·¡¼ Æ÷±âÇϱâ Àü¿¡ ÀÌ ¸ðµç °ÍµéÀ» ½ÃµµÇØ º¸½Ê½Ã¿À.
DirectX¿Í °ü·ÃµÈ ¹®Á¦µµ ÀÖ½À´Ï´Ù. ¹®Á¦°¡ ÀÖ°í °ÔÀÓÀÌ DirectX¸¦ »ç¿ëÇÑ´Ù¸é, ¾Æ·¡ÀÇ ¹æ¹ýÀ» ½ÃµµÇØ º¸½Ê½Ã¿À.
°¡´ÉÇϸé â(Windowed ¿ªÁÖ: ÀÔ·Â ¹æ½ÄÀ» ÀüÀûÀ¸·Î ¿î¿µÃ¼Á¦¿¡ ¸Ã±è) ¸ðµå¿¡¼ ½ÃÇèÇØ º¸½Ê½Ã¿À. ±×·¯¸é DirectX ¹®Á¦°¡ ÇØ°áµÉ Áöµµ ¸ð¸¨´Ï´Ù.
Çȼ¿À̳ª À̹ÌÁö ¸í·É¾î¸¦ »ç¿ëÇÒ ¶§, DirectX ¹®Á¦°¡ ´õ ¸¹ÀÌ ÀϾ ¼öµµ ÀÖ½À´Ï´Ù.
¾î¶² »öÀ» ¾òÀ¸·Á°í ½ÃµµÇÏ´ÂÁö¿¡ »ó°ü¾øÀÌ »ö±òÀÌ °ËÁ¤»öÀ¸·Î ¹Ù²ð ¼ö ÀÖ½À´Ï´Ù (0x000000).
±×°ÍÀº ÇØ°áÇϱ⠾î·Á¿î ¶Ç´Ù¸¥ ¹®Á¦ÀÔ´Ï´Ù.
µÇµµ·ÏÀ̸é Windowed ¸ðµå¿¡¼ ½ÇÇàÇØ º¸½Ê½Ã¿À.
AutoHotkey¸¦ ¸ðµç ÇÁ·Î±×·¥¿¡¼ ÀÛµ¿ÇϽÃÅ°´Â ´Ü ÇÑ°¡Áö ÇØ°áÃ¥Àº ¾ø½À´Ï´Ù. ½ÃµµÇÑ ¸ðµç °ÍÀÌ ½ÇÆÐÇÑ´Ù¸é, ¾ÈŸ±õ°Ôµµ AutoHotkey·Î´Â ¿©·¯ºÐÀÇ ¿ä±¸¸¦ ¸¸Á·½Ãų ¼ö ¾ø´Â °ÍÀÔ´Ï´Ù.
SetKeyDelay, 0, 50
SetKeyDelay, 150, 150, Play
; ÇÁ·Î±×·¥À» ½ÇÇàÇÕ´Ï´Ù. ÁÖÀÇ: ´ëºÎºÐÀÇ ÇÁ·Î±×·¥Àº Àüü ÆÄÀÏ °æ·Î¸¦ ¿ä±¸ÇÕ´Ï´Ù. Run, %A_ProgramFiles%\Some_Program\Program.exe ; À¥ »çÀÌÆ®¸¦ ½ÇÇàÇÕ´Ï´Ù Run, http://ahkscript.org
; À©µµ¿ìÁîÀÇ Ç¥ÁØ ÇÁ·Î±×·¥µé°ú °°ÀÌ Àüü °æ·Î°¡ ÇÊ¿äÇÏÁö ¾ÊÀº ÇÁ·Î±×·¥ÀÌ ÀÖ½À´Ï´Ù. Run, Notepad.exe Run, MsPaint.exe ; ³»Àå AHK º¯¼ö¸¦ »ç¿ëÇÏ¿© "My Documents" Æú´õ¸¦ ¿±´Ï´Ù. Run, %A_MyDocuments% ; À¥ »çÀÌÆ®¸¦ ½ÇÇàÇÕ´Ï´Ù Run, http://ahkscript.org Run, http://www.google.com
´õ ±íÀº Á¤º¸¿Í ´õ ¸¹Àº ¿¹Á¦´Â ´ÙÀ½À» ÂüÁ¶ÇÕ´Ï´Ù:
commands/Run.htm.
µµ¿òÀÌ µÇ´Â ¸µÅ©:
¸ðµç ¸í·É¾î ¸ñ·Ï: commands/index.htm
¸ðµç ³»Àå ÇÔ¼ö ¸ñ·Ï: Functions.htm#BuiltIn
±×ÀÇ ±¸¹®À» º¸¸é (±×ÀÇ °Ñ ¸ð½ÀÀ¸·Î) ¸í·É¾îÀÎÁö ¾Æ´ÑÁö ±¸ºÐÇÒ ¼ö ÀÖ½À´Ï´Ù.
¸í·É¾î´Â ¸Å°³º¯¼ö¿¡ ¹Ý°ýÈ£"()"¸¦ »ç¿ëÇÏÁö ¾ÊÁö¸¸ ÇÔ¼ö´Â »ç¿ëÇÕ´Ï´Ù.
±×·¡¼ ¸í·É¾î´Â ´ÙÀ½°ú °°ÀÌ º¸ÀÔ´Ï´Ù:
Command, parameter1, parameter2, parameter3
¸í·É¾î¸¦ »ç¿ëÇÒ ¶§, ´Ù¸¥ ¸í·É¾î¸¦ °°Àº ÁÙ¿¡ ³õÀ» ¼ö ¾ø½À´Ï´Ù (¿¹¿Ü: ifEqual).
¸í·É¾î¸¦ ´Ù¸¥ ¸í·É¾îÀÇ ¸Å°³º¯¼ö ¾È¿¡ ³õÀ» ¼ö ¾ø½À´Ï´Ù.
Msgbox, Hello Run, Notepad.exe ; À߸øµÊ Msgbox, Hello, Run, Notepad.exe ; À߸øµÊ Msgbox, Hello ; ¿Ã¹Ù¸§ Run, Notepad.exe¸í·É¾î´Â ¶Ç "ÀüÅëÀûÀÎ ±¸¹®"À» »ç¿ëÇÑ´Ù´Â Á¡¿¡¼ ÇÔ¼ö¿Í ´Ù¸¨´Ï´Ù. ±× Àǹ̴Â:
º¯¼ö
¸¦ »ç¿ëÇÒ ¶§, ±× µÑ·¹¿¡ %¸¦ »ç¿ëÇÒ ÇÊ¿ä°¡ ÀÖ´Ù´Â ¶æÀÔ´Ï´Ù. %variable%
.
ÅؽºÆ®¿Í ¼ýÀÚ´Â "ÀÎ¿ë ºÎÈ£" ¾È¿¡ ÀÖÀ» ÇÊ¿ä°¡ ¾ø½À´Ï´Ù: ¿¹, This is some text
.
°Ô´Ù°¡, ÇÔ¼ö¿Í´Â ´Ù¸£°Ô ¸Å°³º¯¼ö ¾È¿¡¼ ¼öÇнÄÀ» »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.
¸Å°³º¯¼ö¿¡ ¼öÇнÄÀ» »ç¿ëÇÒ ¼ö´Â ÀÖ½À´Ï´Ù. °Á¦·Î %
±âÈ£·Î Ç¥Çö½ÄÀ» ¸¸µé¸é µÇÁö¸¸, ÀÌ¿¡ °üÇؼ´Â ´Ù·çÁö ¾Ê°Ú½À´Ï´Ù.
Function(parameter1, parameter2, parameter3)
SubStr(37*12, 1, 2)
SubStr(A_Hour-12, 2)
SubStr(A_Now, 7, 2)
SubStr(A_AHKPath, inStr(A_AHKPath, "AutoHotkey"))
SubStr("I'm scripting, awesome!", 16)
MyVariable:=Function(Parameters)
MyVariable:=SubStr("I'm scripting, awesome!", 16)
À̰͸¸ÀÌ À¯ÀÏÇÑ ¹æ¹ýÀº ¾Æ´Õ´Ï´Ù. ±×·¯³ª °¡Àå ¸¹ÀÌ »ç¿ëµÇ´Â ¹æ¹ýÀÔ´Ï´Ù.
MyVariable
º¯¼ö¸¦ :=ÀÇ ¿À¸¥ÂÊ¿¡ ÀÖ´Â ÇÔ¼öÀÇ °ªÀ¸·Î ÇÒ´çÇÏ°í ÀÖ½À´Ï´Ù (ÀÌ °æ¿ì, SubStr(...)
).
ÇÔ¼ö¿¡ °üÇÏ¿© ´õ ÀÚ¼¼ÇÑ °ÍÀº ¿©±â¸¦ ÂüÁ¶ÇÕ´Ï´Ù.
; ´ÙÀ½Àº ¸í·É¾îÀÔ´Ï´Ù Msgbox, ÀÌ°ÍÀº ÅؽºÆ®ÀÔ´Ï´Ù. StringReplace, Output, Input, AutoHotKey, AutoHotkey, ALL SendInput, ÀÌ°Å Á¤¸» ±²ÀåÇϳ׿ä{!}{!}{!} ; ´ÙÀ½Àº ÇÔ¼öÀÔ´Ï´Ù SubStr("½ºÅ©¸³ÆÃÀ» ÇÏ°í ÀÖ¾î¿ä, Á¤¸» Á׿©Áֳ׿ä!", 16) FileExist(VariableContainingPath) Output:=SubStr("½ºÅ©¸³ÆÃÀ» ÇÏ°í ÀÖ¾î¿ä, Á¤¸» Á׿©Áֳ׿ä!", 16)
ÄÚµå ºí·ÏÀº È°°ýÈ£ ¾È¿¡ ÀÖ´Â °ÍµéÀÔ´Ï´Ù ({ ±×¸®°í }).
ÇÑ ±×·ìÀÇ ´ÜÀ§·Î ¹¾î ÁֹǷΠAutoHotkey´Â ±×°ÍÀ» ÇÔ²² ÀÖ¾î¾ß ÇÏ´Â ÇϳªÀÇ Ä¿´Ù¶õ °¡Á·À¸·Î ÀνÄÇÕ´Ï´Ù.
If ±×¸®°í Loop¿Í ÇÔ²² °¡Àå ¸¹ÀÌ »ç¿ëµË´Ï´Ù.
ÀÌ°ÍÀÌ ¾ø´Ù¸é, ºí·Ï¿¡¼ ù ÁÙ¸¸ È£ÃâµË´Ï´Ù.
if (var=5) { MsgBox, var equals %var%!! Exitapp }
if (var=5) MsgBox, var´Â %var%¿Í °°½À´Ï´Ù!! Exitapp
if (var=5) MsgBox, var´Â %var%¿Í °°½À´Ï´Ù!! MsgBox, ÀÌÁ¦ if ¼¼ú¹® '¹Û¿¡' ÀÖ½À´Ï´Ù. ¾Æ·¡¿¡ ÇÑ ÁÙ¸¸ Àֱ⠶§¹®¿¡ {}ÀÌ ÇÊ¿äÇÏÁö ¾Ê½À´Ï´Ù.
º¯¼ö´Â ÀÛÀº Æ÷½ºÆ®ÀÕ ¸Þ¸ðÁöó·³ ±× ¾È¿¡ Á¤º¸¸¦ ´ã½À´Ï´Ù. ÅؽºÆ®³ª, ¼ýÀÚ, ±×¸®°í ÇÔ¼ö³ª ¸í·É¾î ½ÉÁö¾î ¼öÇÐ ¹æÁ¤½ÄÀ¸·ÎºÎÅÍ ¾òÀº µ¥ÀÌÅ͸¦ ÀúÀåÇÏ´Â µ¥ »ç¿ëÇÕ´Ï´Ù. º¯¼ö°¡ ¾ø´Ù¸é ÇÁ·Î±×·¡¹Ö & ½ºÅ©¸³ÆÃÀº Á¤¸» Â¥Áõ³ª´Â ÀÏÀÌ µÉ °ÍÀÔ´Ï´Ù.
variable=text
variable=%variable2%
variable:="text"
variable:=variable2
variable:=6+8/3*2-sqrt(9)
var=%var2% some text %var3%.
var:="The value of 5+ " Variable " is: " 5+Variable
¾Õ¿¡ ½Éº¼ÀÌ ÀÖ´Â ¸ðµç µîÈ£ ±âÈ£(=)´Â ÇÒ´ç ¿¬»êÀÚ¶ó°í ºÎ¸¨´Ï´Ù. ¾ðÁ¦³ª Ç¥Çö½ÄÀÔ´Ï´Ù. ]
±×·¡¼ :=
+=
-=
.=
µîµîÀº ¾ðÁ¦³ª Ç¥Çö½ÄÀ» »ç¿ëÇÕ´Ï´Ù.
º¯¼ö¿Í °ü·ÃÇÏ¿© ¿ÀÅäÇÖÅ°¿¡¼ °¡Àå ¸¹ÀÌ Á¦±âµÇ´Â ¹®Á¦Áß Çϳª´Â ¾ðÁ¦ ÆÛ¼¾Æ® ±âÈ£ (%)¸¦ »ç¿ëÇϴ°¡ ÇÏ´Â °ÍÀÔ´Ï´Ù. ´ÙÀ½ ¼³¸íÀ¸·Î ±ò²ûÇÏ°Ô È¥¶õÀÌ Á¦°ÅµÇ±â¸¦ ¹Ù¶ø´Ï´Ù.
StringLen, OutputVar, InputVar
Var = 123abc
If Var1 < %Var2%
If (Var1 != Var2) Var1 := Var2 + 100
InputBox, OutputVar, Question 1, À̸§ÀÌ ¹«¾ùÀԴϱî? if (OutputVar="Bill") MsgBox, ¸ÚÁø À̸§À̱º¿ä, %OutputVar%. InputBox, OutputVar2, Question 2, ¿ÀÅäÇÖÅ°¸¦ ÁÁ¾ÆÇմϱî? if (OutputVar2="yes") MsgBox, %OutputVar2%`¶ó°í ´äÇØ Áּż °í¸¿½À´Ï´Ù. %OutputVar%! ¿©·¯ºÐÀÇ ÈǸ¢ÇÑ Ä£±¸°¡ µÇ¾î µå¸®°Ú½À´Ï´Ù. else MsgBox, %OutputVar%`, Á¤¸» ½½ÇÁ±º¿ä.
MsgBox, 4, , °è¼ÓÇϽðڽÀ´Ï±î? IfMsgBox, No Return ; NoÀ̸é, Äڵ带 ¸ØÃä´Ï´Ù. MsgBox ´ç½ÅÀº YES¸¦ ´·¶½À´Ï´Ù. ; ±×·¸Áö ¾ÊÀ¸¸é, »ç¿ëÀÚ´Â yes¸¦ °í¸¥ °ÍÀÔ´Ï´Ù.
; ÆÛ¼¾Æ® ±âÈ£¸¦ »ç¿ëÇØ¾ß ÇÒ ¶§¿Í ÇÏÁö ¸»¾Æ¾ß ÇÒ ¶§´Â º¸¿©ÁÖ´Â ¸î °¡Áö ¿¹µé Variable=text ; º¯¼ö¿¡ ÅؽºÆ®¸¦ ÇÒ´çÇÕ´Ï´Ù. 'ÀüÅëÀûÀÎ' ÇÒ´ç¹æ½ÄÀÔ´Ï´Ù. VariableNumber:=6 ; º¯¼ö¿¡ ¼ýÀÚ¸¦ ÇÒ´çÇÕ´Ï´Ù. 'Ç¥Çö½Ä' ÇÒ´çÀÔ´Ï´Ù. Variable2=%Variable% ; º¯¼ö¸¦ ¶Ç´Ù¸¥ º¯¼ö¿¡ ÇÒ´çÇÕ´Ï´Ù. ÀüÅëÀûÀÎ ÇÒ´çÀ» »ç¿ëÇÕ´Ï´Ù. Variable3:=Variable ; º¯¼ö¸¦ ¶Ç´Ù¸¥ º¯¼ö¿¡ ÇÒ´çÇÕ´Ï´Ù. Ç¥Çö½Ä ÇÒ´çÀÔ´Ï´Ù. Variable4.=Variable ; º¯¼ö¸¦ ¶Ç´Ù¸¥ º¯¼öÀÇ ³¡¿¡ Ãß°¡ÇÕ´Ï´Ù. Ç¥Çö½Ä ÇÒ´çÀÔ´Ï´Ù. Variable5+=VariableNumber ; º¯¼öÀÇ °ªÀ» ¶Ç´Ù¸¥ º¯¼ö¿¡ Ãß°¡ÇÕ´Ï´Ù. Ç¥Çö½Ä ÇÒ´çÀÔ´Ï´Ù. Variable5-=VariableNumber ; º¯¼öÀÇ °ªÀ» ¶Ç´Ù¸¥ º¯¼ö·ÎºÎÅÍ »®´Ï´Ù. Ç¥Çö½Ä ÇÒ´çÀÔ´Ï´Ù. Variable6:=SubStr(Variable, 2, 2) ; ÇÔ¼ö ¾ÈÀÇ º¯¼öÀÔ´Ï´Ù. ÀÌ°ÍÀº ¾ðÁ¦³ª Ç¥Çö½Ä ÇÒ´çÀÔ´Ï´Ù. Variable7=%Variable% Text ; º¯¼ö¸¦ ¶Ç´Ù¸¥ º¯¼ö¿¡ ¾à°£ÀÇ ÅؽºÆ®¿À ÇÔ²² ÇÒ´çÇÕ´Ï´Ù. ÀüÅëÀûÀÎ ÇÒ´çÀ» »ç¿ëÇÕ´Ï´Ù. Variable8:=Variable " Text" ; º¯¼ö¸¦ ¶Ç´Ù¸¥ º¯¼ö¿¡ ¾à°£ÀÇ ÅؽºÆ®¿Í ÇÔ²² ÇÒ´çÇÕ´Ï´Ù. Ç¥Çö½Ä ÇÒ´çÀ» »ç¿ëÇÕ´Ï´Ù. MsgBox, %Variable% ; ¸í·É¾î ¾ÈÀÇ º¯¼öÀÔ´Ï´Ù. StringSplit, Variable, Variable, x ; InputVar¿Í OutputVar¸¦ »ç¿ëÇÏ´Â ¸í·É¾î ¾ÈÀÇ º¯¼öÀÔ´Ï´Ù. if (VariableNumber=6) ; IF¿¡ °ýÈ£°¡ ÀÖÀ» ¶§¸¶´Ù, ±×°ÍÀº Ç¥Çö½ÄÀÔ´Ï´Ù. ±×·¡¼ %¸¦ »ç¿ëÇÏÁö ¾Ê½À´Ï´Ù. If (Variable != VariableNumber) ; IF¿¡ °ýÈ£°¡ ÀÖÀ» ¶§¸¶´Ù, ±×°ÍÀº Ç¥Çö½ÄÀÔ´Ï´Ù. ±×·¡¼ %¸¦ »ç¿ëÇÏÁö ¾Ê½À´Ï´Ù. if VariableNumber=6 ; °ýÈ£°¡ ¾øÀ¸¸é, ±× if´Â ÀüÅëÀûÀÔ´Ï´Ù. ±×·¸Áö¸¸, '¿À¸¥ÂÊ¿¡ ÀÖ´Â' º¯¼ö¸¸ %°¡ ÇÊ¿äÇÕ´Ï´Ù. If Var1 < %Var2% ; °ýÈ£°¡ ¾øÀ¸¸é, ±× if´Â ÀüÅëÀûÀÔ´Ï´Ù. ±×·¸Áö¸¸, '¿À¸¥ÂÊ¿¡ ÀÖ´Â' º¯¼ö¸¸ %°¡ ÇÊ¿äÇÕ´Ï´Ù.
°´Ã¼´Â Á» ´õ È¿À²ÀûÀ¸·Î »ç¿ëÇϱâ À§ÇØ µ¥ÀÌÅ͸¦ Á¶Á÷ÇÏ´Â ¹æ¹ýÀÔ´Ï´Ù. Á¾Á¾ °´Ã¼´Â ¹è¿À̶ó°í ÁöĪµÇ±âµµ ÇÕ´Ï´Ù. ±×·¯³ª ¸ðµç ¹è¿Àº ±×³É °´Ã¼ÀÏ »ÓÀ̶ó´Â »ç½ÇÀ» ÀνÄÇÏ´Â °ÍÀÌ Áß¿äÇÕ´Ï´Ù. °´Ã¼¸¦ ¾îµð¿¡ »ç¿ëÇÏ·Á°í Çϴ°¡¿¡ µû¶ó ´Ù¸£°Ô ºÎ¸£±âµµ ÇÏÁö¸¸, ±× ¸ðµç °´Ã¼´Â °°Àº °ÍÀÔ´Ï´Ù.
MyObject := ["one", "two", "three", 17]
"one"
Àº °´Ã¼ Å°1
¿¡ ÀúÀåµË´Ï´Ù (À妽º 1), ±×¸®°í °ª 17
Àº °´Ã¼ Å° 4
¿¡ ÀúÀåµË´Ï´Ù (À妽º 4).
Banana := {"Shape": "Elongated", "Color": "Yellow", "Taste": "Delicious", "Price": 3}
"yellow"
´Â °´Ã¼ Å° "color"
¿¡ ÀúÀåµË´Ï´Ù. ¶Ç, °ª 3
Àº °´Ã¼ Å° "Price"
¿¡ ÀúÀåµË´Ï´Ù.
MyObject := Array("one", "two", "three", 17)
Banana := Object("Shape", "Elongated", "Color", "Yellow", "Taste", "Delicious", "Price", 3)
:=
ÀÇ ¿ÞÂÊ¿¡.Banana.Consistency := "Mushy"
Banana["Pickled"] := True ; ÀÌ ¹Ù³ª³ª´Â ÀýÀÎ ¹Ù³ª³ªÀÔ´Ï´Ù. ¿ìÀ¡.
Value := Banana["Color"]
"Color"
¸¦ »ç¿ëÇß½À´Ï´Ù. ÀÌ°ÍÀÌ (´ç¿¬È÷) Å° Color
ÀÔ´Ï´Ù.
¸Þ½ÃÁö ¹Ú½º¿¡ "Yellow"¶ó´Â ´Ü¾î°¡ ³ªÅ¸³¯ ÅÙµ¥, ÀÌ°ÍÀº ¾Õ ¼½¼Ç¿¡¼ Å° Color
¿¡ ÇÒ´çÇß´ø °ªÀÔ´Ï´Ù.
Value := Banana.Color
MyObject.NewKey := "Shiny"
MyObject["NewerKey"] := 3.1415
MyObject.InsertAt(Index, Value1, Value2, Value3...)
MyObject.Push(Value1, Value2, Value3...)
HasKey
¸Þ½îµå¸¦ »ç¿ëÇϸé Å°°¡ ¿©ÀüÈ÷ Á¸ÀçÇÑ´Ù°í ¾Ë·ÁÁÙ ¼ö ÀÖ½À´Ï´Ù. ±×·¯¸é ¿©ÀüÈ÷ for
ȸµ¹ÀÌ¿¡ ³ªÅ¸³¯ °ÍÀÔ´Ï´Ù. (ȸµ¹ÀÌ¿¡ °üÇؼ´Â ³ªÁß¿¡ ÀÚ¼¼È÷ ¸»¾¸µå¸®°Ú½À´Ï´Ù)
RemovedValue := MyObject.Delete(AnyKey)
MyObject[AnyKey]
ÀÇ ÀÌÀü °ªÀº RemovedValue¿¡ ÀúÀåµË´Ï´Ù.
NumberOfRemovedKeys := MyObject.Delete(FirstKey, LastKey)
MyObject.Pop()
RemovedValue := MyObject.RemoveAt(Index)
NumberOfRemovedKeys := MyObject.RemoveAt(Index, Length)
ÀÌÁ¦ ¿©ÇàÀÇ ¸·¹ÙÁö¿¡ ´Ù´Ù¶ú½À´Ï´Ù. ¸ðÂÉ·Ï ¹«¾ð°¡¸¦ ¹è¿ü±â¸¦ ¹Ù¶ø´Ï´Ù. ±×·¯³ª ³¡³»±â Àü¿¡, ¿©·¯ºÐÀÌ ²À ¾Ë¾Æ¾ß ÇÑ´Ù°í »ý°¢ÇÏ´Â ´Ù¸¥ °ÍµéÀ» ¿©±â¿¡ Á¦½ÃÇÕ´Ï´Ù. Áñ°Å¿î ½Ã°£ µÇ½Ã±â¸¦!
ControlGetText, OutputVar [, Control, WinTitle, WinText, ExcludeTitle, ExcludeText]
ControlGetText, OutputVar
ControlGetText, OutputVar, Control, WinTitle
ControlGetText, OutputVar, Control,,, ExcludeTitle
¸Å°³º¯¼ö´Â ¹«½ÃÇÒ ¼ö ¾ø½À´Ï´Ù. ±×³É ºó ä·Î ³õ¾Æ µÎ´Â °ÍÀº ±¦Âú½À´Ï´Ù.
"WinTitle, WinText"¸¦ ¹«½ÃÇØ ¹ö¸®¸é, ´ÙÀ½°ú °°ÀÌ º¸ÀÏ °ÍÀÌ°í ¹®Á¦¸¦ ÀÏÀ¸Åµ´Ï´Ù:
ControlGetText, OutputVar, Control, ExcludeTitle
´ÙÀ½Àº À¯È¿ÇÕ´Ï´Ù.
ControlGetText, OutputVar, Control,,, ExcludeTitle
MsgBox, %A_AHKVersion%¶Ç´Â "AutoHotkey µµ¿ò¸» ÆÄÀÏ" ¶Ç´Â "AutoHotkey.chm"À» ½ÃÀÛ ¸Þ´º³ª ¼³Ä¡ µð·ºÅ丮¿¡¼ ã¾Æ º¸½Ê½Ã¿À.
½ÃÇà Âø¿À´Â ¹è¿ò¿¡¼ ¾ÆÁÖ ÈçÇÏ°í È¿°úÀûÀÎ ¹æ¹ýÀÔ´Ï´Ù. ¸ðµç °Íµé¿¡ µµ¿òÀ» ±¸ÇÏ´Â ´ë½Å¿¡, Á» È¥ÀÚ¸¸ÀÇ ½Ã°£À» °¡Áö°í (¸î ½Ã°£À̳ª ¸î ÀÏ µ¿¾È) ÀÛµ¿½ÃÄÑ º¸·Á°í ½ÃµµÇÏ´Â °ÍÀÌ ´õ »¡¸® ¹è¿ì´Âµ¥ µµ¿òÀÌ µÇ½Ç °Ì´Ï´Ù.
¹º°¡¸¦ ½ÃµµÇØ º¸°í ¿¡·¯¸¦ ¸ÂÀÌÇØ º¸¸é¼, ±× ¿¡·¯¸¦ ¿¬±¸ÇÕ´Ï´Ù. ´ÙÀ½ Äڵ带 ¼öÁ¤ÇÑ ´ÙÀ½, ´Ù½Ã ½ÃµµÇØ º¾´Ï´Ù. ¿©ÀüÈ÷ ¿¡·¯¸¦ ¸ÂÀÌÇÑ´Ù¸é, Äڵ带 Á» ´õ ¼öÁ¤ÇÕ´Ï´Ù. Äڵ尡 ´õ ÀÌ»ó ½ÇÆÐÇÏÁö ¾ÊÀ» ¶§±îÁö °è¼Ó ½Ãµµ¿Í ½ÇÆи¦ °ÅµìÇÕ´Ï´Ù. ¹®¼¸¦ Àаí, ¿¡·¯¸¦ ÀÐ°í ¹«¾ùÀÌ ÀÛµ¿ÇÏ°í ¹«¾ùÀÌ ÀÛµ¿ÇÏÁö ¾Ê´ÂÁö ¹è¿ì¸é¼ ¸¹Àº °ÍÀ» ¹è¿ì½Ç °Ì´Ï´Ù. ½Ãµµ, ½ÇÆÐ, ½Ãµµ, ½ÇÆÐ,½Ãµµ, ½ÇÆÐ, ½Ãµµ, ½ÇÆÐ, ¼º°ø!
ÀÌ ¹æ¹ýÀ¸·Î ¼ö ¸¹Àº "ÇÁ·ÎµéÀÌ" ¹è¿ü½À´Ï´Ù. ±×·¯³ª µµ¿òÀ» ±¸ÇÏ´Â µ¥ µÎ·Á¿öÇÏÁö ¸¶½Ê½Ã¿À. ¸é¹Ú´çÇÏÁö ¾Ê½À´Ï´Ù. ¹è¿ì´Â µ¥´Â ½Ã°£ÀÌ ÇÊ¿äÇϸç, ¿©·¯ºÐÀÌ ¸¸³ª´Â "ÇÁ·Î"°¡ ´Ü ¸î ½Ã°£ ¸î ÀÏ ¸¸¿¡ ¹è¿ö¼ ¸¶½ºÅÍ°¡ µÈ °ÍÀÌ ¾Æ´Õ´Ï´Ù.
"óÀ½¿¡´Â ¼º°øÇÏÁö ¸øÇÏ´õ¶óµµ, ´Ù½Ã ½Ãµµ, ¶Ç ½Ãµµ, ½ÃµµÇ϶ó." - Hickson, William E.
if (car="old") { msgbox, the car is really old if (wheels="flat") { msgbox, this car is not safe to drive. Return } else { msgbox, Be careful! This old car will be dangerous to drive. } } else { msgbox, My`, what a shiny new vehicle you have there. }µé¿©¾²±âÇÔ:
if (car="old") { msgbox, ÀÚµ¿Â÷°¡ Á¤¸» ¿À·¡µÇ¾ú½À´Ï´Ù if (wheels="flat") { msgbox, ÀÌ ÀÚµ¿Â÷´Â ¿îÀüÇϱ⿡ ¾ÈÀüÇÏÁö ¾Ê½À´Ï´Ù. Return } else { msgbox, ÁÖÀÇÇϼ¼¿ä! ÀÌ ±¸Çü ÀÚµ¿Â÷´Â ¿îÀüÇϱ⿡ À§ÇèÇÕ´Ï´Ù. } } else { msgbox, ¿Í¿ì`, Á¤¸» ¸ÚÁø ÀÚµ¿Â÷¸¦ °¡Áö¼Ì±º¿ä. }Wiki¿¡ ´Ù¾çÇÑ ½ºÅ¸ÀÏ°ú ¿¹Á¦°¡ ÀÖ½À´Ï´Ù. ¿©·¯ºÐÀÌ Àб⿡ °¡Àå ½±´Ù°í »ý°¢ÇÏ´Â ½ºÅ¸ÀÏÀ» °ñ¶ó µé¿©¾²±â ÇÏ´Â ¹ýÀ» ¹è¿ì½Ê½Ã¿À.