¥½¥Õ¥È/UWSC
[¥½¥Õ¥È]
UWSC¤È¤ÏWindowsÁàºî¤ò¥¹¥¯¥ê¥×¥Èµ½Ò¤Ç¹Ô¤¨¤ë¥Ä¡¼¥ë¤Ç¤¹¡£Áàºî¤òÏ¿²è¤·¤Æ¡¢µÏ¿¤µ¤ì¤¿¥¹¥¯¥ê¥×¥È¤ò¥Æ¥¥¹¥È¥¨¥Ç¥£¥¿¤ÇÊÔ½¸¤·¡¢ºÆÀ¸¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£
¥³¥Ä¡§µ½ÒÎ̤ò¾¯¤Ê¤¯¤·¡¢¥¦¥¤¥ó¥É¥¦¥µ¥¤¥º¤¬ÊѤï¤Ã¤¿¤ê¤·¤Æ¤âÆ°¤¯¤è¤¦¤Ë¤¹¤ë¤¿¤á¡¢¤Ê¤ë¤Ù¤¯¹â¥ì¥Ù¥ëAPI¤òÍѤ¤¤Æ¥¹¥¯¥ê¥×¥È¤òµ½Ò¤·¤Þ¤¹
- Äã¥ì¥Ù¥ëAPI¡Ê¥¡¼¡¢¥Þ¥¦¥¹¤ÎľÀÜÁàºî¡Ë
- Ãæ¥ì¥Ù¥ëAPI¡Ê¥¦¥¤¥ó¥É¥¦¤Ëʸ»ú¤òÁ÷¤Ã¤¿¤ê¡¢¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤¿¤ê¡Ë
- window_id = GETID(¥¿¥¤¥È¥ë°ìÉô¤Îʸ»úÎó, [¥¯¥é¥¹Ì¾])
- ÌáÃÍ = STATUS(window_id, STATUS¼ïÎà)
- CTRLWIN(window_id, Ì¿Îá)
- ACW(window_id, x, y[, w, h, ms])
- SCKEY(window_id, ¥¡¼[, ¥¡¼, ¥¡¼, ¥¡¼, ...])
- ÌáÃÍ = CLKITEM(window_id, ¥¢¥¤¥Æ¥à̾[, ¥¢¥¤¥Æ¥à¼ïÊÌ, On/Off, ÈÖ¹æ(1¡Á)])
- ÌáÃÍ = CHKBTN(window_id, ¥¢¥¤¥Æ¥à̾[, ÈÖ¹æ(1¡Á)])
- SENDSTR(window_id, ʸ»úÎó[, ÈÖ¹æ(1¡Á), Á÷¿®¥â¡¼¥É¥Õ¥é¥°])
- ʸ»úÎóÌáÃÍ = GETSTR(window_id[, ÈÖ¹æ, GETSTR¼ïÊÌ])
- ¹â¥ì¥Ù¥ëAPI¡ÊInternet ExplorerÁàºî¡¢ExcelÁàºî¤Ê¤É¡Ë
- ¥ê¥ó¥¯
Äã¥ì¥Ù¥ëAPI¡Ê¥¡¼¡¢¥Þ¥¦¥¹¤ÎľÀÜÁàºî¡Ë
KBD(²¾ÁÛKEY[, CLICK¡Ê¥Ç¥Õ¥©¥ë¥È¡Ë/DOWN/UP, ¼Â¹Ô¤Þ¤Ç¤ÎÂÔ¤Á»þ´Ö(ms)] )
¥¡¼¤ò²¡¤·¤Þ¤¹¡£
MMV(x, y, [¼Â¹Ô¤Þ¤Ç¤ÎÂÔ¤Á»þ´Ö(ms)])
¥Þ¥¦¥¹¤ò°ÜÆ°¤·¤Þ¤¹¡£
BTN(LEFT/RIGHT/MIDDLE/WHEEL, CLICK/DOWN/UP/WHEEL»ØÄê»þ¤Ï¥Î¥Ã¥Á¿ô, [¼Â¹Ô°ÌÃÖx, ¼Â¹Ô°ÌÃÖy, ¼Â¹Ô¤Þ¤Ç¤ÎÂÔ¤Á»þ´Ö(ms)] )
¥Þ¥¦¥¹¥Ü¥¿¥ó¤òÁàºî¤·¤Þ¤¹¡£
Ãæ¥ì¥Ù¥ëAPI¡Ê¥¦¥¤¥ó¥É¥¦¤Ëʸ»ú¤òÁ÷¤Ã¤¿¤ê¡¢¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤¿¤ê¡Ë
window_id = GETID(¥¿¥¤¥È¥ë°ìÉô¤Îʸ»úÎó, [¥¯¥é¥¹Ì¾])
»ØÄꥦ¥¤¥ó¥É¥¦¤ÎID¿ôÃͤòÊÖ¤·¤Þ¤¹¡£
°Ê²¼¤ÏÆÃÊ̤ʥ¦¥¤¥ó¥É¥¦¤Ç¤¹
GETID(GET_ACTIVE_WIN) // ¥¢¥¯¥Æ¥£¥Ö¥¦¥¤¥ó¥É¥¦¤òÊÖ¤·¤Þ¤¹ GETID(GET_FROMPOINT_WIN) // ¥Þ¥¦¥¹¥«¡¼¥½¥ë²¼¤Î¥¦¥¤¥ó¥É¥¦ GETID(GET_FROMPOINT_OBJ) // ¥Þ¥¦¥¹¥«¡¼¥½¥ë²¼¤Î¥ª¥Ö¥¸¥§¥¯¥È GETID(GET_THISUWSC_WIN) // UWSC¼«¿È GETID(GET_LOGPRINT_WIN) // ¥í¥°É½¼¨ÍÑ¥¦¥¤¥ó¥É¥¦ GETID(GET_FUKIDASI_WIN) // ¤Õ¤¤À¤·ÍÑ¥¦¥¤¥ó¥É¥¦ GETID(GET_FORM_WIN) // ¥Õ¥©¡¼¥à²èÌÌ¥¦¥¤¥ó¥É¥¦
ÌáÃÍ = STATUS(window_id, STATUS¼ïÎà)
¥¦¥¤¥ó¥É¥¦¤Î³Æ¼ï¾õÂÖ¤ò¼èÆÀ
STATUS¼ïÎà | ÆâÍÆ |
ST_TITLE | ¥¿¥¤¥È¥ë¤òÊÖ¤¹ |
ST_CLASS | ¥¯¥é¥¹Ì¾¤òÊÖ¤¹ |
ST_X | XºÂɸ¤òÊÖ¤¹ |
ST_Y | YºÂɸ¤òÊÖ¤¹ |
ST_WIDTH | Éý¤òÊÖ¤¹ |
ST_HEIGHT | ¹â¤µ¤òÊÖ¤¹ |
ST_CLX | ¥¯¥é¥¤¥¢¥ó¥ÈÎΰè¤ÎXºÂɸ¤òÊÖ¤¹ |
ST_CLY | ¥¯¥é¥¤¥¢¥ó¥ÈÎΰè¤ÎYºÂɸ¤òÊÖ¤¹ |
ST_CLWIDTH | ¥¯¥é¥¤¥¢¥ó¥ÈÎΰè¤ÎÉý¤òÊÖ¤¹ |
ST_CLHEIGHT | ¥¯¥é¥¤¥¢¥ó¥ÈÎΰè¤Î¹â¤µ¤òÊÖ¤¹ |
ST_PARENT | ¿Æ¥¦¥¤¥ó¥É¥¦¤ÎID¤òÊÖ¤¹¡¢¿Æ¤¬Ìµ¤±¤ì¤Ð-1 |
ST_ICON | ¥¢¥¤¥³¥ó¾õÂ֤Ǥ¢¤ì¤ÐTRUE¡¢¤Ç¤Ê¤±¤ì¤ÐFALSE |
ST_VISIBLE | Ä̾ï¤Îɽ¼¨¾õÂ֤Ǥ¢¤ì¤ÐTRUE¡¢¤Ç¤Ê¤±¤ì¤ÐFALSE |
ST_ACTIVE | ¥¢¥¯¥Æ¥£¥Ö¾õÂ֤Ǥ¢¤ì¤ÐTRUE¡¢¤Ç¤Ê¤±¤ì¤ÐFALSE |
ST_BUSY | ¥Ó¥¸¡¼¾õÂ֤Ǥ¢¤ì¤ÐTRUE¡¢¤Ç¤Ê¤±¤ì¤ÐFALSE |
ST_PATH | EXE¤Î¥Ñ¥¹¤òÊÖ¤¹ ¡Ê64bit¥¢¥×¥êNG¡Ë |
ST_PROCESS | ¥×¥í¥»¥¹ID¤òÊÖ¤¹ |
ST_WIN64 | 64bit¥¢¥×¥ê¤Ç¤¢¤ì¤ÐTRUE¡¢¤Ç¤Ê¤±¤ì¤ÐFALSE |
CTRLWIN(window_id, Ì¿Îá)
¥¦¥¤¥ó¥É¥¦¤òÀ©¸æ¤·¤Þ¤¹
Ì¿Îá | ÆâÍÆ |
CLOSE | ½ªÎ» |
CLOSE2 | ½ªÎ»¡ÊQUIT¡Ë |
ACTIVATE | ¥¢¥¯¥Æ¥£¥Ö |
HIDE | Èóɽ¼¨ |
SHOW | ɽ¼¨ |
MIN | ¥¢¥¤¥³¥ó²½ |
MAX | ºÇÂç²½ |
NORMAL | ¥µ¥¤¥ºÌ᤹ |
TOPMOST | ºÇÁ°Ì̤˸ÇÄê |
NOTOPMOST | ºÇÁ°Ì̸ÇÄê¤ò²ò½ü |
ACW(window_id, x, y[, w, h, ms])
¥¦¥¤¥ó¥É¥¦°ÌÃÖ¤ª¤è¤ÓÂ礤µ¤òÊѹ¹
SCKEY(window_id, ¥¡¼[, ¥¡¼, ¥¡¼, ¥¡¼, ...])
¥¦¥¤¥ó¥É¥¦¤Ç¥¡¼¤ò²¡¤·¤Þ¤¹¡£
- ¢¨VK_SHIFT, VK_CTRL, VK_ALT, VK_WIN ¤Î¥¡¼»ØÄê¤Ï²¡¤·²¼¤²¾õÂ֤Ȥ·¤Æ½èÍý¤µ¤ì¤Þ¤¹
- ¢¨»ØÄꤹ¤ë¥¦¥¤¥ó¥É¥¦¤¬¤Ê¤¤¾ì¹ç¤Ë¤ÏID¤Ë0¤ò»ØÄꤷ¤Þ¤¹
ÌáÃÍ = CLKITEM(window_id, ¥¢¥¤¥Æ¥à̾[, ¥¢¥¤¥Æ¥à¼ïÊÌ, On/Off, ÈÖ¹æ(1¡Á)])
¥³¥ó¥È¥í¡¼¥ë¤ò¥¯¥ê¥Ã¥¯¤·¤Þ¤¹¡£¸ÂÄꤷ¤¿¤¤¾ì¹ç¤Ï¥¢¥¤¥Æ¥à¼ïÊ̤òÄɲä·¤Þ¤¹¡£¥¢¥¤¥Æ¥à̾¤Ë¤Ï¼¡¤òÆþÎϤ·¤Þ¤¹
¥¢¥¤¥Æ¥à̾¾Î | ¥¢¥¤¥Æ¥à̾ | ¥¢¥¤¥Æ¥à¥¢¥¤¥Æ¥à¼ïÊÌ |
¥Ü¥¿¥ó¡¢¥Á¥§¥Ã¥¯¥Ü¥Ã¥¯¥¹¡¢¥é¥¸¥ª¥Ü¥¿¥ó | ¥¥ã¥×¥·¥ç¥ó¤Îʸ»ú | CLK_BTN |
¥ê¥¹¥È¥Ü¥Ã¥¯¥¹¡¢¥³¥ó¥Ü¥Ü¥Ã¥¯¥¹ | ÁªÂò̾¢¨£± | CLK_LIST |
¥¿¥Ö¥³¥ó¥È¥í¡¼¥ë | ¥¿¥Ö̾ | CLK_TAB |
¥á¥Ë¥å¡¼ | ¥á¥Ë¥å¡¼¹àÌÜ̾ | CLK_MENU |
¥Ä¥ê¡¼¥Ó¥å¡¼ | ¹àÌÜ̾ | CLK_TREEVEW |
¥ê¥¹¥È¥Ó¥å¡¼ | ¹àÌÜ̾ | CLK_LSTVEW |
¥Ä¡¼¥ë¥Ð¡¼ | ¥Ü¥¿¥ó̾ | CLK_TOOLBAR |
À®¸ù¤·¤¿¾ì¹ç¤ÏTRUE¤¬ÊÖ¤ê¤Þ¤¹¡£
- ¢¨£±¡§¥ê¥¹¥È¥Ü¥Ã¥¯¥¹¤ÇÊ£¿ôÁªÂò¤Î¾ì¹ç¤Ï ¥¿¥Ö¤Ë¤Æ ¥¢¥¤¥Æ¥à̾¤ò·Ò¤²¤ë
- ¢¨¥¢¥¤¥Æ¥à̾¤ÎºÇ¸å¤ËÉÕ¤¯ ¥Ë¡¼¥â¥Ë¥Ã¥¯[(&A)¡¢(&B)...¡¢(&C):Åù]¤ÏÍפê¤Þ¤»¤ó
- ¢¨¥á¥Ë¥å¡¼,¥Ä¥ê¡¼¥Ó¥å¡¼¡§ \ ¤Ë¤Æ¥Ñ¥¹»ØÄêɽµ²Ä¡ÊÎ㡧TOP\TEMP\FILE ¡Ë¤Ö¤Ä¤«¤ëʪ¤¬¤Ê¤±¤ì¤Ð¥Ñ¥¹»ØÄê¤ÏÉÔÍ×
- ¢¨Æ±Ì¾¤Î¥¢¥¤¥Æ¥à¤¬¤¢¤ë¾ì¹ç¤ÏÈÖ¹æ¤Ç¶èÊ̤Ǥ¤Þ¤¹
ÌáÃÍ = CHKBTN(window_id, ¥¢¥¤¥Æ¥à̾[, ÈÖ¹æ(1¡Á)])
¥Ü¥¿¥óÎà¡Ê¥Á¥§¥Ã¥¯¥Ü¥Ã¥¯¥¹¡¢¥é¥¸¥ª¥Ü¥¿¥ó¡Ë¤Î¾õÂÖ¤òÊÖ¤·¤Þ¤¹
ÌáÃÍ | ÆâÍÆ |
-1 | ¸ºß¤·¤Ê¤¤¤«Ìµ¸ú¾õÂÖ |
0 | OFF |
1 | ON |
2 | ¥Á¥§¥Ã¥¯¥Ü¥Ã¥¯¥¹¤Ë¤Æø¿§¾õÂÖ |
SENDSTR(window_id, ʸ»úÎó[, ÈÖ¹æ(1¡Á), Á÷¿®¥â¡¼¥É¥Õ¥é¥°])
¥¦¥¤¥ó¥É¥¦¤Î¥Õ¥©¡¼¥«¥¹¤¬Åö¤¿¤Ã¤Æ¤¤¤ë¥³¥ó¥È¥í¡¼¥ë¤Ëʸ»úÎó¤òÁ÷¤ê¤Þ¤¹¡£
- ¢¨¥¦¥¤¥ó¥É¥¦ID¤¬£°¤Î¤È¤¤Ï¥¯¥ê¥Ã¥×¥Ü¡¼¥É¤Ëʸ»úÎó¤òÀßÄꤷ¤Þ¤¹
- ¢¨ÈÖ¹æ(1¡Á)¤ò»ØÄꤹ¤ë¤È¡¢º¸¾å¤«¤é¿ô¤¨¤¿¥³¥ó¥È¥í¡¼¥ë¤Ëʸ»úÎó¤òÁ÷¤ì¤Þ¤¹¡Ê¥Ç¥Õ¥©¥ë¥È¤ÏÈֹ棰¤Ç¡¢¥Õ¥©¡¼¥«¥¹¤¬Åö¤¿¤Ã¤Æ¤¤¤ë¥³¥ó¥È¥í¡¼¥ë¤Ëʸ»úÎó¤òÁ÷¤ê¤Þ¤¹¡Ë
- ¢¨Á÷¿®¥â¡¼¥ÉTRUE: ʸ»úÎóÄɲáʥǥե©¥ë¥È¡Ë Á÷¿®¥â¡¼¥ÉFALSE: ʸ»úÎóÃÖ¤´¹¤¨
ʸ»úÎóÌáÃÍ = GETSTR(window_id[, ÈÖ¹æ, GETSTR¼ïÊÌ])
¥¦¥¤¥ó¥É¥¦¤Î¥Õ¥©¡¼¥«¥¹¤¬Åö¤¿¤Ã¤Æ¤¤¤ë¥³¥ó¥È¥í¡¼¥ë¤«¤éʸ»úÎó¤ò¼èÆÀ¤·¤Þ¤¹¡£
- ¢¨¥¦¥¤¥ó¥É¥¦ID¤¬£°¤Î¤È¤¤Ï¥¯¥ê¥Ã¥×¥Ü¡¼¥Éʸ»úÎó¤ò¼èÆÀ¤·¤Þ¤¹
- ¢¨ÈÖ¹æ(1¡Á)¤ò»ØÄꤹ¤ë¤È¡¢º¸¾å¤«¤é¿ô¤¨¤¿¥³¥ó¥È¥í¡¼¥ë¤Ëʸ»úÎó¤òÁ÷¤ì¤Þ¤¹¡Ê¥Ç¥Õ¥©¥ë¥È¤ÏÈֹ棰¤Ç¡¢¥Õ¥©¡¼¥«¥¹¤¬Åö¤¿¤Ã¤Æ¤¤¤ë¥³¥ó¥È¥í¡¼¥ë¤Ëʸ»úÎó¤òÁ÷¤ê¤Þ¤¹¡Ë
- ¢¨GETSTR¼ïÊ̤ϼ¡¤ÎÃͤòÀßÄꤷ¤Þ¤¹
GETSTR¼ïÊÌ ÆâÍÆ STR_EDIT ¥¨¥Ç¥£¥È¥³¥ó¥È¥í¡¼¥ë¡Ê¥Ç¥Õ¥©¥ë¥È¡Ë STR_STATIC ¥¹¥¿¥Æ¥£¥¯¥³¥ó¥È¥í¡¼¥ë STR_STATUS ¥¹¥Æ¡¼¥¿¥¹¥Ð¡¼
¹â¥ì¥Ù¥ëAPI¡ÊInternet ExplorerÁàºî¡¢ExcelÁàºî¤Ê¤É¡Ë
Internet ExplorerÁàºî
ie = CREATEOLEOBJ("InternetExplorer.Application") ie.visible = TRUE ie.navigate("http://www.yahoo.co.jp") ie.document.forms[1].name_text.value = "abc" IF !ie.document.forms[1].name_foo.checked() THEN ie.document.forms[1].name_foo.click()
¢¨³«¤¤¤Æ¤¤¤ëInternet Explorer¤òÁàºî¤¹¤ë¤È¤¤Ïie = GETACTIVEOLEOBJ("InternetExplorer.Application", "¥¦¥¤¥ó¥É¥¦¥¿¥¤¥È¥ë")
ExcelÁàºî
excel = CREATEOLEOBJ("EXCEL.Application") excel.visible = TRUE excel.workbooks.add() excel.range("A1").select excel.range("A1:B2").select excel.rows("1").select excel.rows("1:2").select excel.columns("A").select excel.columns("A:B").select excel.range("A1").value = 99 excel.selection.value = 99 excel.range("A1").copy excel.range("A1").cut excel.Activesheet.paste
¢¨³«¤¤¤Æ¤¤¤ëExcel¤òÁàºî¤¹¤ë¤È¤¤Ïexcel = GETACTIVEOLEOBJ("EXCEL.Application", "¥¦¥¤¥ó¥É¥¦¥¿¥¤¥È¥ë")
¥ê¥ó¥¯
- UWSC³«È¯¸µ
- UWSC¤ÇIE¤ò¼«Æ°Áàºî¤¹¤ë¥é¥¤¥Ö¥é¥ê 1.3
- [(³ô)¥³¥ó¥Õ¥ì¥Ã¥¸]UWSC Technology UWSCʸˡ¤Ê¤É¤¬À°Íý¤µ¤ì¤Æ¤¤¤Þ¤¹
- [Rubyist Magazine]Win32OLE ³èÍÑË¡ ¡ÚÂè 1 ²ó¡Û Win32OLE ¤³¤È¤Ï¤¸¤á
- [CX's UWSC Diary]UWSC ´ðÁÃʸˡºÇ®¥Þ¥¹¥¿¡¼
- [uwsc¥¹¥¯¥ê¥×¥È¤Î¥Ö¥í¥°]¥¦¥¤¥ó¥É¥¦¤ä¥À¥¤¥¢¥í¥°¤«¤é¡¢¥¿¥¤¥È¥ë¤È¥¯¥é¥¹¡¢CLKITEM¤ÇÁàºî²Äǽ¤Ê¥ª¥Ö¥¸¥§¥¯¥È¤Î¾ðÊó¤ò¼èÆÀ¤¹¤ë Alt¥¡¼¤ò²¡¤·¤Æ¥¦¥£¥ó¥É¥¦¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢GETID°ú¿ôÃͤʤɤòɽ¼¨¤¹¤ë¥¹¥¯¥ê¥×¥È¤Ç¤¹