找一个屏幕滚动帖子【已解决】
以前记得在论坛看到过一个帖子,可以把屏幕一直滚动的效果。哪位朋友能找到那个帖子,谢谢! 没印象…… 星战? afan 发表于 2022-2-22 18:05没印象…… 星战?
就是那种恶搞的效果,像以前得老电视没调好,屏幕会一直翻滚的效果。 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
EndFunc ;==>_GetDC 这里找到一个屏幕抖动的效果
#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 + 5, $sCoor - 5, $iWidth, $iHeight, 1)
_WinAPI_MoveWindow($Hwnd, $sCoor, $sCoor - 10, $iWidth, $iHeight, 1)
_WinAPI_MoveWindow($Hwnd, $sCoor - 5, $sCoor - 5, $iWidth, $iHeight, 1)
_WinAPI_MoveWindow($Hwnd, $sCoor, $sCoor, $iWidth, $iHeight, 1)
$HwndChang = _WinAPI_GetForegroundWindow()
If $Hwnd <> $HwndChang Then
ExitLoop
EndIf
WEnd
EndFunc
Func _Exit()
Exit
EndFunc afan 发表于 2022-2-22 21:28
确实没印象,恶搞倒是有一个,也可以整得稀烂
找到了。。
https://www.autoitx.com/thread-4719-1-1.html
页:
[1]