- 論壇徽章:
- 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, "^發(fā)表帖子"); #識別不了漢字?
- for (@windows) {
- print "$_>\t'", GetWindowText($_), "'\n";
- SetForegroundWindow($_);
- SendKeys("%fn~a{TAB}b{TAB}{BS}{DOWN}");
- }# %是ALT,~是ENTER鍵,fn是字符
復(fù)制代碼 FindWindowLike識別不了漢字嗎?用漢字作正則表達(dá)式?jīng)]有輸出,如果有字母,數(shù)字的話可以輸出,求解 |
|