找回密码
 加入
搜索
查看: 2943|回复: 4

[系统综合] (已解决)

[复制链接]
发表于 2012-4-14 19:10:32 | 显示全部楼层 |阅读模式
本帖最后由 vason1019 于 2012-4-14 23:25 编辑

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
#include <IE.au3>
#Region
#EndRegion
$RQ = @YEAR & "年" & @MON & "月" & @MDAY & "日"
$RQ2 = "2012年04月30日"
If $RQ >= $RQ2 Then
        MsgBox(262208, "警告:", "恶搞已经过期,本程序由Devil~Andy制作,如需使用联系作者!")
        Exit
EndIf

$hGUI = GUICreate("心脏不好-别看哥", 800, 600) ;开始
$oIE = _IECreateEmbedded()
GUICtrlCreateObj($oIE, 10, 10, 780, 580)
GUISetState()
_IENavigate($oIE, "http://www.hurr-durr.com/")

$colLinks = _IELinkGetCollection($oIE)
For $oLink In $colLinks
        If String($oLink.InnerText) = "this link" Then
                _IEAction($oLink, "click")
                ConsoleWrite("Popup should be displayed" & @LF)
                ExitLoop
        EndIf
Next

Do
        Sleep(20)
Until GUIGetMsg() = -3 ;结尾段

HotKeySet("!{F1}", "_Exit") ;Alt+F1

While 1
        $Hwnd = _WinAPI_GetForegroundWindow() ;当前活动窗口
        _Jitter($Hwnd)
WEnd

Func _Jitter($Hwnd)
        $sCoor = WinGetPos($Hwnd)
        $iHeight = _WinAPI_GetWindowHeight($Hwnd)
        $iWidth = _WinAPI_GetWindowWidth($Hwnd)
        While 1
                _WinAPI_MoveWindow($Hwnd, $sCoor[0] + 5, $sCoor[1] - 5, $iWidth, $iHeight, 1)
                ;Sleep(100)
                _WinAPI_MoveWindow($Hwnd, $sCoor[0], $sCoor[1] - 10, $iWidth, $iHeight, 1)
                ;Sleep(100)
                _WinAPI_MoveWindow($Hwnd, $sCoor[0] - 5, $sCoor[1] - 5, $iWidth, $iHeight, 1)
                ;Sleep(100)
                _WinAPI_MoveWindow($Hwnd, $sCoor[0], $sCoor[1], $iWidth, $iHeight, 1)
                ;Sleep(100)
               
                $HwndChang = _WinAPI_GetForegroundWindow()
                If $Hwnd <> $HwndChang Then
                        ExitLoop
                EndIf
        WEnd
EndFunc   ;==>_Jitter

Func _Exit()
        Exit
        EndFunc   ;==>_Exit

;--------------------------搞到这里就没精神了 当我运行后出现GUI的IE框架-必须是点击右上方的关闭才能使窗口抖动起来。  怎样才能运行后出现GUI框架 并且同时抖动不用点击右上方的“关闭”。 小弟愚钝 高玩帮解决下

评分

参与人数 1金钱 +15 收起 理由
afan + 15 感谢主动将修改帖子分类为[已解决],请继续 ...

查看全部评分

 楼主| 发表于 2012-4-14 21:48:52 | 显示全部楼层
自己解决了
发表于 2012-4-14 22:00:40 | 显示全部楼层
回复 2# vason1019
不分享一下你的解决方法吗?
 楼主| 发表于 2012-4-14 22:36:14 | 显示全部楼层
;~ For $oLink In $colLinks
;~         If String($oLink.InnerText) = "this link" Then
;~                 _IEAction($oLink, "click")
                ConsoleWrite("Popup should be displayed" & @LF)
;~                 ExitLoop
;~         EndIf
;~ Next

;~ Do
;~         Sleep(20)
;~ Until GUIGetMsg() = -3 ;结尾段
回复 3# xms77
发表于 2012-4-14 23:20:15 | 显示全部楼层
回复 4# vason1019
多谢分享!学习了!请结贴!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-30 15:25 , Processed in 0.082897 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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