|
MS-IME単語登録
- ページ: Macro/投稿
- 作者: りーや?
- カテゴリー: pls
- 投稿日: 2005-07-01 (金) 20:35:24
メッセージ
拡張モジュールGuiTest が必要
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
| | use Win32::GuiTest qw(FindWindowLike SetForegroundWindow SendKeys);
use Win32::Clipboard;
$CLIP = Win32::Clipboard();
$Win32::GuiTest::debug = 0;
$execComm = "C:\\WINDOWS\\ime\\IMJP8_1\\imjpdct.exe";
@windows = FindWindowLike(0, "\x92\x50\x8c\xea\x2f");
$kanji = GetSelectedString(0);
unless($kanji){
SelectWord();
$kanji = GetSelectedString(0);
}
Copy();
if (not @windows) {
ExecCommand($execComm , 0 );
while(not @windows){
sleep 1;
@windows = FindWindowLike(0, "\x92\x50\x8c\xea\x2f");
}
}
$imeWin = shift(@windows);
SetForegroundWindow($imeWin);
SendKeys("{PAUSE 300}");
SendKeys("%g");
SendKeys("^v");
$CLIP->Empty();
SendKeys("+{HOME}");
SendKeys("{F13}", 300);
SendKeys("{ESCAPE}", 200);
SendKeys("{ESCAPE}", 200);
SendKeys("+{END}");
SendKeys("^c");
$kana = $CLIP->GetText();
if($kana == $kanji){
SendKeys("{F13}", 300);
SendKeys("{ESCAPE}", 200);
SendKeys("{ENTER}");
}
SendKeys("+{HOME}");
SendKeys("^c");
$kana = $CLIP->GetText();
SendKeys("{F13}", 300);
SendKeys("{ENTER}");
SendKeys("%y");
SendKeys("^v");
|
|
|