ControlSend / ControlSendRaw

Èä³»³½ Å°´­¸²À» âÀ̳ª ÄÜÆ®·Ñ¿¡ º¸³À´Ï´Ù.

ControlSend [, Control, Keys, WinTitle, WinText, ExcludeTitle, ExcludeText]
ControlSendRaw: À§¿Í ¸Å°³º¯¼ö µ¿ÀÏ.

¸Å°³º¯¼ö

Control

ClassNN (ÄÜÆ®·ÑÀÇ Å¬·¡½ºÀ̸§°ú ½Çü ¹øÈ£) ¶Ç´Â ÄÜÆ®·ÑÀÇ ÅؽºÆ®ÀÏ ¼ö ÀÖ½À´Ï´Ù. µÑ ¸ðµÎ Window Spy¸¦ ÅëÇÏ¿© ¾Ë¾Æ³¾ ¼ö ÀÖ½À´Ï´Ù. ÅؽºÆ®¸¦ »ç¿ëÇÒ ¶§, ºÎÇÕ ÇàÀ§´Â SetTitleMatchMode·Î °áÁ¤µË´Ï´Ù. ÀÌ ¸Å°³º¯¼ö°¡ ºñ¾î Àְųª »ý·«µÇ¸é, ¸ñÇ¥ âÀÇ ÃÖ»óÀ§ ÄÜÆ®·ÑÀÌ »ç¿ëµË´Ï´Ù. ÀÌ ¸Å°³º¯¼ö°¡ ahk_parentÀ̸é, Å°´­¸²ÀÌ ±×ÀÇ ÄÜÆ®·Ñ Áß Çϳª°¡ ¾Æ´Ï¶ó °ð¹Ù·Î ¸ñÇ¥ âÀ¸·Î Àü¼ÛµË´Ï´Ù (¿¹Á¦´Â Winamp ÀÚµ¿È­Çϱ⸦ ÂüÁ¶ÇϽʽÿÀ).

ÄÜÆ®·ÑÀÇ HWND (â ÇÚµé)¿¡ ÀÛµ¿½ÃÅ°·Á¸é, Control ¸Å°³º¯¼ö¸¦ ºñ¿öµÎ°í ahk_id %ControlHwnd%¸¦ WinTitle ¸Å°³º¯¼ö¿¡ ÁöÁ¤ÇϽʽÿÀ (ÀÌ°ÍÀº ¼ûÀº ÄÜÆ®·Ñ¿¡µµ ÀÛµ¿ÇÕ´Ï´Ù. DetectHiddenWindows°¡ ²¨Á® À־ »ó°üÀÌ ¾ø½À´Ï´Ù). ÄÜÆ®·ÑÀÇ HWND´Â ÀüÇüÀûÀ¸·Î ControlGet Hwnd, MouseGetPos, ¶Ç´Â DllCallÀ» ÅëÇÏ¿© ¿­¶÷ÇÕ´Ï´Ù.

Keys

Àü¼ÛÇÒ Å° ¿¬¼Ó (ÀÚ¼¼ÇÑ °ÍÀº Send ¸í·É¾î ÂüÁ¶). ¹®ÀÚ ±×´ë·ÎÀÇ ½°Ç¥¸¦ Àü¼ÛÇÏ·Á¸é, ÇǽŽÃÅ°½Ê½Ã¿À (`,). ¹®ÀÚ¸¦ Àü¼ÛÇÏ´Â ºñÀ²Àº SetKeyDelay·Î °áÁ¤µË´Ï´Ù.

Send ¸í·É¾î¿Í ´Ù¸£°Ô, ¸¶¿ì½º Ŭ¸¯Àº ControlSend·Î º¸³¾ ¼ö ¾ø½À´Ï´Ù. ¸¶¿ì½º Ŭ¸¯À» º¸³»·Á¸é ControlClickÀ» »ç¿ëÇϽʽÿÀ.

WinTitle

¸ñÇ¥ âÀ» ½Äº°Çϴ â Á¦¸ñÀ̳ª ±âŸ ±âÁØ. WinTitle ÂüÁ¶.

WinText

Á¸ÀçÇϸé, ÀÌ ¸Å°³º¯¼ö´Â ¸ñÇ¥ â ÅؽºÆ®ÀÇ ºÎ¹®ÀÚ¿­ÀÔ´Ï´Ù (Window Spy¿¡ ³ëÃâ). ¼ûÀº ÅؽºÆ®´Â DetectHiddenText°¡ ÄÑÁ®(ON) ÀÖ¾î¾ß ŽÁöµË´Ï´Ù.

ExcludeTitle

Á¦¸ñ¿¡ ÀÌ °ªÀÌ Àִ âÀº ¹èÁ¦ÇÕ´Ï´Ù.

ExcludeText

ÅؽºÆ®¿¡ ÀÌ °ªÀÌ Àִ âÀº ¹èÁ¦ÇÕ´Ï´Ù.

ErrorLevel

[v1.1.04+] ÀÌ ¸í¾î´Â ½ÇÆнà ¿¹¿Ü¸¦ ´øÁú ¼ö ÀÖ½À´Ï´Ù. ´õ ÀÚ¼¼ÇÑ Á¤º¸´Â ½ÇÇà½Ã°£ ¿¡·¯¸¦ ÂüÁ¶ÇϽʽÿÀ.

ErrorLevelÀº ¹®Á¦°¡ ÀÖÀ¸¸é 1 ¾øÀ¸¸é 0ÀÌ ¼³Á¤µË´Ï´Ù.

³íÆò

ControlSendRaw´Â Keys ¸Å°³º¯¼ö¿¡ ÀÖ´Â Å°´­¸²À» Á¤È®ÇÏ°Ô ³ªÅ¸³ª´Â ±×´ë·Î Àü¼ÛÇÕ´Ï´Ù. {Enter}¸¦ ENTER Å°´­¸²À¸·Î, ^c¸¦ Control-C·Î, µîµî º¯È¯ÇÏÁö ¾Ê½À´Ï´Ù.

Control ¸Å°³º¯¼ö¸¦ »ý·«Çϸé, ÀÌ ¸í·É¾î´Â ¸ñÇ¥ â¿¡ Á÷Á¢ Àü¼ÛÀ» ½ÃµµÇÕ´Ï´Ù. ±×ÀÇ ÃÖ»óÀ§ ÄÜÆ®·Ñ¿¡ Àü¼ÛÇϰųª (º¸Åë ¿Ã¹Ù¸¥ â) ¶Ç´Â ÄÜÆ®·ÑÀÌ ¾øÀ¸¸é ±× â ÀÚü¿¡ Àü¼ÛÇÕ´Ï´Ù. â¿¡ ÄÜÆ®·ÑÀÌ ÀüÇô ¾ø´Â µí º¸ÀÏ ¶§, ¶Ç´Â ±×³É ÆíÇÏ°Ô ¾î´À ÄÜÆ®·Ñ¿¡ º¸³»¾ß ÇÒÁö °í¹ÎÇÏ°í ½ÍÁö ¾ÊÀ» ¶§ À¯¿ëÇÕ´Ï´Ù.

±âº»°ªÀ¸·Î, ¼ö½Ä Å° (Control, Alt, Shift, ±×¸®°í Win)´Â º¸Åë Send ¸í·É¾î·Î Àü¼ÛµÇ´Â °Í°ú ¶È °°ÀÌ Àü¼ÛµË´Ï´Ù. ÀÌ·¸°Ô ÇÏ¸é ¸í·É¾î ÇÁ·ÒÇÁÆ®¿Í ±âŸ ÄÜ¼Ö Ã¢ÀÌ ´ë¹®ÀÚ, Á¦¾î ¹®ÀÚ µîµîÀ» ÀûÀýÇÏ°Ô Å½ÁöÇÒ ¼ö ÀÖ½À´Ï´Ù. ¶Ç ´Ù¸¥ ¸é¿¡¼­ ½Å·Ú¼ºµµ Çâ»óµË´Ï´Ù.

±×·¸Áö¸¸, ¾î¶² °æ¿ì ÀÌ ¼ö½Ä À̺¥Æ®´Â È°¼º â°ú ¾ôÈú ¼ö ÀÖ½À´Ï´Ù. ƯÈ÷ ControlSend°¡ ÁøÇà ÁßÀÎ µ¿¾È¿¡ »ç¿ëÀÚ°¡ °Ý·ÄÇÏ°Ô Å¸ÀÚÇÏ°í ÀÖ´Ù¸é ¶Ç´Â Alt Å°°¡ Àü¼Û ÁßÀ̶ó¸é (Alt´Â È°¼º âÀÇ ¸Þ´º ¹Ù¸¦ È°¼ºÈ­ ½ÃÅ°±â ¶§¹®¿¡) °£¼· Çö»óÀÌ ÀϾ ¼ö ÀÖ½À´Ï´Ù. ÀÌ·± ÀÏÀº ´ÙÀ½ ¿¹Á¦¿Í °°Àº ¸í½ÃÀûÀ¸·Î ¼ö½Ä Å°¸¦ ´©¸£°í ¶¼´Â À̺¥Æ®¸¦ Àü¼ÛÇϸé ÇÇÇÒ ¼ö ÀÖ½À´Ï´Ù:

ControlSend, Edit1, {Alt down}f{Alt up}, Untitled - Notepad

À§ÀÇ ¹æ¹ýÀº ¶Ç ¿öÅ©½ºÅ×À̼ÇÀÌ Àá°Ü ÀÖ´Â µ¿¾È (·Î±×¿Â ÇÁ·ÒÇÁÆ®·Î º¸È£µÇ¾î ÀÖ´Â µ¿¾È)¿¡µµ ¼ö½ÄÅ° ´­¸² (Control/Alt/Shift/Win)À» Àü¼ÛÇÒ ¼ö ÀÖ½À´Ï´Ù.

BlockInput´Â ¸í·É¾î ÇÁ·ÒÇÁÆ®¿Í °°Àº ÄÜ¼Ö Ã¢¿¡ ControlSend¸¦ »ç¿ëÇÒ ¶§ Àý´ë ÇÇÇØ¾ß ÇÕ´Ï´Ù. ¿Ö³ÄÇϸé Control°ú °°Àº ¼ö½ÄÅ°¿Í ´ë¼Ò¹®ÀÚ º¯È¯ÀÌ Á¦´ë·Î ÀÛµ¿ÇÏÁö ¸øÇϱ⠶§¹®ÀÔ´Ï´Ù.

SetKeyDelayÀÇ °ªÀº Å°°¡ Àü¼ÛµÇ´Â ¼Óµµ¸¦ °áÁ¤ÇÕ´Ï´Ù. ¸ñÇ¥ âÀÌ Å° ´­¸²À» Á¦´ë·Î ¹ÞÁö ¾ÊÀ¸¸é, ´ÙÀ½ ¿¹Á¦¿Í °°Àº SetKeyDelayÀÇ µÎ ¹ø° ¸Å°³º¯¼ö¸¦ ÅëÇÏ¿© ´©¸§ Áö¼Ó ½Ã°£À» ´Ã·Á º¸½Ê½Ã¿À:

SetKeyDelay, 10, 10
SetKeyDelay, 0, 10
SetKeyDelay, -1, 0

¸ñÇ¥ ÄÜÆ®·ÑÀÌ Edit ÄÜÆ®·ÑÀ̸é (¶Ç´Â ±× ºñ½ÁÇÑ ÄÜÆ®·ÑÀ̸é), ControlSendº¸´Ù ´ÙÀ½ÀÌ º¸Åë ´õ ¹ÏÀ» ¸¸ÇÏ°í ´õ ºü¸¨´Ï´Ù:

Control, EditPaste, ÀÌ ÅؽºÆ®´Â ij·µ À§Ä¡¿¡ »ðÀԵ˴ϴÙ., ControlName, WinTitle
ControlSetText, ControlName, ÀÌ ÅؽºÆ®´Â ÇöÀç ÅؽºÆ®¸¦ ¿ÏÀüÈ÷ ±³Ã¼ÇÕ´Ï´Ù., WinTitle

ControlSend´Â ÀϹÝÀûÀ¸·Î âÀÇ ¸Þ´º ¹Ù¸¦ Á¶ÀÛÇÒ ¼ö ¾ø½À´Ï´Ù. À̸¦ ¿ìȸÇÏ·Á¸é, WinMenuSelectItemÀ» »ç¿ëÇϽʽÿÀ. ¸Þ´º ¹ÙÀÇ Æ¯¼º ¶§¹®¿¡ ±× ¸¶Àúµµ »ç¿ëÇÒ ¼ö ¾øÀ¸¸é, ¿øÇÏ´Â ¸Þ´º Ç׸ñ¿¡ »óÀÀÇÏ´Â ¸Þ½ÃÁö¸¦ ã¾Æº¸½Ê½Ã¿À. ´ÙÀ½ SendMessage ÀÚ½À¼­¸¦ µû¸£½Ã¸é µË´Ï´Ù.

â Á¦¸ñ°ú ÅؽºÆ®´Â ´ë¼Ò¹®ÀÚ¿¡ ¹Î°¨ÇÕ´Ï´Ù. ¼ûÀº âÀº DetectHiddenWindows°¡ ÄÑÁ® ÀÖ¾î¾ß ŽÁöµË´Ï´Ù.

°ü·Ã Ç׸ñ

SetKeyDelay, ÇǽŠ¿¬¼Ó¿­ (¿¹, `%), Control, ControlGet, ControlGetText, ControlMove, ControlGetPos, ControlClick, ControlSetText, ControlFocus, Send, Winamp ÀÚµ¿È­Çϱâ

¿¹Á¦

ControlSend, Edit1, ÀÌ ÁÙÀº ³ëÆ®Æеå â¿¡ ÀÖ´Â ÁÙÀÔ´Ï´Ù., Untitled
SetTitleMatchMode, 2
ControlSend, , abc, cmd.exe  ; ¸í·É¾î ÇÁ·ÒÇÁÆ® â¿¡ Á÷Á¢ Àü¼ÛÇÕ´Ï´Ù.