找回密码
 加入
搜索
查看: 6346|回复: 7

[系统综合] 这种非正常窗口怎么激活 ? SoS !

  [复制链接]
发表于 2014-4-16 11:26:51 | 显示全部楼层 |阅读模式


winactivate 不能激活,   不能发送键盘命令.
窗口置顶,鼠标点下桌面,点下窗口可以激活 ,发送键盘命令..
何解.....


                SoS...      ...............

意图 ( 激活窗口并且发送几个键盘命令  Tab  Enter之类的.. )

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2014-4-16 13:47:14 | 显示全部楼层
Run your script as administrator. It should be fine.
 楼主| 发表于 2014-4-16 13:48:40 | 显示全部楼层
回复 2# gapkiller


    windows xp sp3  怎么 as administrator
发表于 2014-4-16 13:50:55 | 显示全部楼层
回复  gapkiller


    windows xp sp3  怎么 as administrator
yuan278501381 发表于 2014-4-16 13:48



    xp..... no idea...
 楼主| 发表于 2014-4-16 13:58:31 | 显示全部楼层
回复 4# gapkiller


   模拟点击, 先点(0,0) 再点 窗口范围怎么整哇..
翻了帮助 获取窗口相对位置, 好像不准..  (可能每台机器显示器分辨率不一样.)
发表于 2014-4-16 16:18:11 | 显示全部楼层
本帖最后由 121044246 于 2014-4-16 16:21 编辑

回复 5# yuan278501381
http://autoitx.com/thread-18391-1-1.html

    查找图片点击
ShellExecuteWait("QMDispatch.exe");将QMDispatch.exe与脚本放在同一个目录

ShellExecute("regsvr32.exe",@SystemDir&"\QMDispatch.dll /s")

findImage()

FileDelete(@SystemDir&"\360.bmp")

FileDelete(@SystemDir&"\close.bmp")



Func findImage()

        $pos = _FindPic(0, 0, @DesktopWidth, @DesktopHeight, @SystemDir&"\360.bmp",1)

                MouseClick("left",$pos[0], $pos[1],1,0)

                Sleep(1000)

                $pos1 = _FindPic(0, 0, @DesktopWidth, @DesktopHeight, @SystemDir&"\close.bmp",1)

                MouseClick("left",$pos1[0], $pos1[1],1,0)

EndFunc   ;==>findImage



        

Func _FindPic($iLeft, $iTop, $iRight, $iBottom, $szFileName, $fSimilar)

        Dim $pos[2]

        $obj = ObjCreate("QMDispatch.QMFunction")

        $foundpixel = $obj.FindPic($iLeft, $iTop, $iRight, $iBottom, $szFileName, $fSimilar)

        $pos[0] = Int($foundpixel / 8192)

        $pos[1] = Mod($foundpixel, 8192)

        Return $pos

EndFunc   ;==>FindPic
发表于 2014-4-20 14:54:13 | 显示全部楼层
#include <WinAPISys.au3>
$hwnd = WinGetHandle("电脑管家")
WinSetState("电脑管家","",@SW_SHOWDEFAULT)                
_WinAPI_SwitchToThisWindow($hwnd)
Send("{tab}")
 楼主| 发表于 2014-4-21 23:12:57 | 显示全部楼层
回复 7# 风行者


    未果,激活了“电脑管家”的加速球程序。。 窗口名都是“电脑管家”。。  (加速球不能关闭)
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-4-20 17:47 , Processed in 0.079311 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表