找回密码
 加入
搜索
查看: 827|回复: 5

[网络通信] 找一个屏幕滚动帖子【已解决】

[复制链接]
发表于 2022-2-22 10:38:04 | 显示全部楼层 |阅读模式
以前记得在论坛看到过一个帖子,可以把屏幕一直滚动的效果。哪位朋友能找到那个帖子,谢谢!
发表于 2022-2-22 18:05:51 | 显示全部楼层
没印象…… 星战?
 楼主| 发表于 2022-2-22 20:57:06 | 显示全部楼层
afan 发表于 2022-2-22 18:05
没印象…… 星战?

就是那种恶搞的效果,像以前得老电视没调好,屏幕会一直翻滚的效果。
发表于 2022-2-22 21:28:56 | 显示全部楼层
haijie1223 发表于 2022-2-22 20:57
就是那种恶搞的效果,像以前得老电视没调好,屏幕会一直翻滚的效果。

确实没印象,恶搞倒是有一个,也可以整得稀烂
#include <ScreenCapture.au3>

Global $hDwmApiDll = DllOpen('dwmapi.dll')
Local $sChkAero = DllStructCreate('int;')
DllCall($hDwmApiDll, 'int', 'DwmIsCompositionEnabled', 'ptr', DllStructGetPtr($sChkAero))
Global $aero = DllStructGetData($sChkAero, 1)
If $aero Then DllCall($hDwmApiDll, 'int', 'DwmEnableComposition', 'uint', False)
Sleep(500)
Opt('GUIOnEventMode', 1)
Global $hDC0 = _GetDC(0)
Global $fTmp = @TempDir & '\xxx.bmp'
_ScreenCapture_Capture($fTmp, 0, 0, -1, -1, False)
Global $hGui = GUICreate('', @DesktopWidth, @DesktopHeight, 0, 0, 0x80000000)
GUISetOnEvent(-3, '_Exit')
GUICtrlCreatePic($fTmp, 0, 0, @DesktopWidth, @DesktopHeight)
Global $hDC1 = _GetDC($hGui)
GUISetState()
Local $iRaW, $iRaH
While 1
        $iRaW = (@DesktopWidth - 128) * Random(0, 1)
        $iRaH = (@DesktopHeight - 128) * Random(0, 1)
        DllCall('gdi32.dll', 'bool', 'BitBlt', 'handle', $hDC1, 'int', $iRaW + (2 * Random(0, 1) - 1), 'int', $iRaH + (2 * Random(0, 1) - 1), 'int', 128, 'int', 128, 'handle', $hDC0, 'int', $iRaW, 'int', $iRaH, 'dword', 0x00CC0020)
WEnd

Func _Exit()
        If $aero Then DllCall($hDwmApiDll, 'int', 'DwmEnableComposition', 'uint', True)
        DllCall('user32.dll', 'int', 'ReleaseDC', 'hwnd', $hGui, 'handle', $hDC1)
        DllCall('user32.dll', 'int', 'ReleaseDC', 'hwnd', 0, 'handle', $hDC0)
        FileDelete($fTmp)
        Exit
EndFunc   ;==>_Exit
Func _GetDC($hh)
        Local $aRt = DllCall('user32.dll', 'handle', 'GetDC', 'hwnd', $hh)
        Return $aRt[0]
EndFunc   ;==>_GetDC
发表于 2022-2-24 22:45:28 | 显示全部楼层
这里找到一个屏幕抖动的效果
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
HotKeySet("!{F1}", "_Exit")
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)
                _WinAPI_MoveWindow($Hwnd, $sCoor[0], $sCoor[1] - 10, $iWidth, $iHeight, 1)
                _WinAPI_MoveWindow($Hwnd, $sCoor[0] - 5, $sCoor[1] - 5, $iWidth, $iHeight, 1)
                _WinAPI_MoveWindow($Hwnd, $sCoor[0], $sCoor[1], $iWidth, $iHeight, 1)
                $HwndChang = _WinAPI_GetForegroundWindow()
                If $Hwnd <> $HwndChang Then
                        ExitLoop
                EndIf
        WEnd
EndFunc
Func _Exit()
        Exit
EndFunc
 楼主| 发表于 2022-2-27 09:44:05 | 显示全部楼层
afan 发表于 2022-2-22 21:28
确实没印象,恶搞倒是有一个,也可以整得稀烂

找到了。。
https://www.autoitx.com/thread-4719-1-1.html
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-3 17:07 , Processed in 0.078313 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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