- 论坛徽章:
- 3
|
本帖最后由 小perl 于 2013-05-06 09:43 编辑
FindWindowLike($window,$titleregex,$classregex,$childid,$maxlevel)
- use Win32::GuiTest qw(FindWindowLike GetWindowText
- SetForegroundWindow SendKeys);
-
- $Win32::GuiTest::debug = 0; # Set to "1" to enable verbose mode
-
- my @windows = FindWindowLike(0, "^发表帖子"); #识别不了汉字?
- for (@windows) {
- print "$_>\t'", GetWindowText($_), "'\n";
- SetForegroundWindow($_);
- SendKeys("%fn~a{TAB}b{TAB}{BS}{DOWN}");
- }# %是ALT,~是ENTER键,fn是字符
复制代码 FindWindowLike识别不了汉字吗?用汉字作正则表达式没有输出,如果有字母,数字的话可以输出,求解 |
|