AutoIt
#include <IE.au3> HotKeySet ( "{ESC}", "_Exit" ) Global $oIE, $_Invert, $oIEhwnd If Not FileExists ( @TempDir &amp; 'wav_1853.wav' ) Then InetGet ( 'http://tinyurl.com/7b86tns', @TempDir &amp; 'wav_1853.wav' ) $oIE = _IECreate ( 'http://www.youtube.com/watch?v=Cc1_UStxZsc', 0, 0 ) $oIE.AddressBar = 0 $oIE.MenuBar = 0 $oIE.StatusBar = 0 $oIE.ToolBar = 0 $oIE.Width = 650 $oIE.Height = 570 $oIEhwnd = HWnd ( $oIE.HWnd ) WinSetOnTop ( $oIEhwnd, '', 1 ) WinMove ( $oIEhwnd, '', ( @DesktopWidth-650 )/2, ( @DesktopHeight -570 )/2 ) SoundPlay ( @TempDir &amp; 'wav_1853.wav', 0 ) $oIE.visible = 1 _IEShakeWindow ( $oIE, 100 ) While 1 If Not WinExists ( $oIEhwnd ) Then Exit $oIE=0 $_Invert = Not $_Invert If $_Invert Then WinSetTitle ( $oIEhwnd, '', 'Happy Christmas To All AutoIt Members !' ) Else WinSetTitle ( $oIEhwnd, '', '' ) EndIf Sleep ( 1000 ) WEnd Func _IEShakeWindow ( $_Object, $_NB ) $_IEVersion = StringRegExpReplace ( RegRead ( 'HKEY_LOCAL_MACHINESoftwareMicrosoftInternet Explorer', 'Version' ), '^(d+)..+$', '$1' ) If $_IEVersion = 9 Then $_NB = $_NB * 4 Local $_JavaCmd = 'var sens=-1;var X=0;var Y=0;' &amp; _ 'for(nb=' &amp; $_NB &amp; ';nb>1;nb=nb-0.15)' &amp; _ '{dx=-X+sens*Math.round(nb*Math.random());' &amp; _ 'dy=-Y+sens*Math.round(nb*Math.random());' &amp; _ 'X=X+dx;Y=Y+dy;top.moveBy(dx,dy);sens=sens*(-1);}top.moveBy(-X,-Y);' BlockInput ( 1 ) $_Object.document.parentwindow.execscript ( $_JavaCmd, 'javascript' ) BlockInput ( 0 ) EndFunc ;==> _IEShakeWindow ( ) Func _Exit ( ) If IsObj ( $oIE ) Then $oIE.quit ( ) $oIE=0 Exit EndFunc ;==> _Exit ( )
Happy Christmas To All AutoIt Members !
Edited by wakillon, 04 November 2012 - 09:48 PM.




