newsak2005 Posted August 5, 2011 Posted August 5, 2011 StarLight ScreenSaver expandcollapse popup#NoTrayIcon #cs======Discription====== CreateDate:4/8/2011 Name:StarLight ScreenSaver Library:_RainFall() DesignBy:sak2005 #ce======================= #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Include <Date.au3> Opt("MustDeclareVars", 1) Main() Func Main() Global $guititle = 'StarLight ScreenSaver' Global $a=-20,$b=-20,$c=-20,$d=-20,$e=-20,$f=-20,$i=-20,$j=-20,$k=-20 Global $l=-20,$m=-20,$n=-20,$o=-20,$p=-20,$q=-20,$r=-20,$t=-20,$u=-20 MouseMove($guititle, 800, 800) GUICreate($guititle, @DesktopWidth, @DesktopHeight, -1, -1) GUISetBkColor(0x000000) GUICtrlCreateLabel("*", 100, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlCreateLabel("*", 150, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xC0C0C0) GUICtrlCreateLabel("*", 200, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlCreateLabel("*", 250, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xC0C0C0) GUICtrlCreateLabel("*", 300, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlCreateLabel("*", 350, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xC0C0C0) GUICtrlCreateLabel("*", 400, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlCreateLabel("*", 450, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xC0C0C0) GUICtrlCreateLabel("*", 500, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlCreateLabel("*", 550, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xC0C0C0) GUICtrlCreateLabel("*", 600, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlCreateLabel("*", 650, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xC0C0C0) GUICtrlCreateLabel("*", 700, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlCreateLabel("*", 750, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xC0C0C0) GUICtrlCreateLabel("*", 800, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlCreateLabel("*", 850, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xC0C0C0) GUICtrlCreateLabel("*", 900, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlCreateLabel("*", 950, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xC0C0C0) GUICtrlCreateLabel(_Now(), 850, 730, 150, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 11, 600, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlCreateLabel("Design by:sak2005", 850, 750, 150, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlCreateLabel("'", 400, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUISetState() AdlibRegister("_timer") Do Local $nMsg = GUIGetMsg() If $nMsg = $GUI_EVENT_MOUSEMOVE Then _timestop() GUIDelete() ExitLoop EndIf Until False EndFunc Func _timer() If WinActive($guititle)Then ControlSetText($guititle, "", "Static19", _Now()) Sleep(10) EndIf If ControlMove($guititle, "", "Static1", Random(0, 950), $a)Then $a += Random(0, 1000) Sleep(Random(0, 100)) If $a > 750 Then $a = -20 EndIf If $a > Random(0, 1000)Then ControlMove($guititle, "", "Static2", Random(0, 950), $b) $b += Random(0, 1000) Sleep(Random(0, 100)) If $b > 750 Then $b = -20 EndIf If $b > Random(0, 1000)Then ControlMove($guititle, "", "Static3", Random(0, 950), $c) $c += Random(0, 1000) Sleep(Random(0, 100)) If $c > 750 Then $c = -20 EndIf If $c > Random(0, 1000)Then ControlMove($guititle, "", "Static4", Random(0, 950), $d) $d += Random(0, 1000) Sleep(Random(0, 100)) If $d > 750 Then $d = -20 EndIf If $d > Random(0, 1000)Then ControlMove($guititle, "", "Static5", Random(0, 950), $e) $e += Random(0, 1000) Sleep(Random(0, 100)) If $e > 750 Then $e = -20 EndIf If $e > Random(0, 1000)Then ControlMove($guititle, "", "Static6", Random(0, 950), $f) $f += Random(0, 1000) Sleep(Random(0, 100)) If $f > 750 Then $f = -20 EndIf If $f > Random(0, 1000)Then ControlMove($guititle, "", "Static7", Random(0, 950), $i) $i += Random(0, 1000) Sleep(Random(0, 100)) If $i > 750 Then $i = -20 EndIf If $i > Random(0, 1000)Then ControlMove($guititle, "", "Static8", Random(0, 950), $j) $j += Random(0, 1000) Sleep(Random(0, 100)) If $j > 750 Then $j = -20 EndIf If @SEC = 29 Or @SEC = 59 Then _RainFall() EndIf If $j > Random(0, 1000)Then ControlMove($guititle, "", "Static9", Random(0, 950), $k) $k += Random(0, 1000) Sleep(Random(0, 100)) If $k > 750 Then $k = -20 EndIf If $k > Random(0, 1000)Then ControlMove($guititle, "", "Static10", Random(0, 950), $l) $l += Random(0, 1000) Sleep(Random(0, 100)) If $l > 750 Then $l = -20 EndIf If $l > Random(0, 1000)Then ControlMove($guititle, "", "Static11", Random(0, 950), $m) $m += Random(0, 1000) Sleep(Random(0, 100)) If $m > 750 Then $m = -20 EndIf If $m > Random(0, 1000)Then ControlMove($guititle, "", "Static12", Random(0, 950), $n) $n += Random(0, 1000) Sleep(Random(0, 100)) If $n > 750 Then $n = -20 EndIf If $n > Random(0, 1000)Then ControlMove($guititle, "", "Static13", Random(0, 950), $o) $o += Random(0, 1000) Sleep(Random(0, 100)) If $o > 750 Then $o = -20 EndIf If $o > Random(0, 1000)Then ControlMove($guititle, "", "Static14", Random(0, 950), $p) $p += Random(0, 1000) Sleep(Random(0, 100)) If $p > 750 Then $p = -20 EndIf If $p > Random(0, 1000)Then ControlMove($guititle, "", "Static15", Random(0, 950), $q) $q += Random(0, 1000) Sleep(Random(0, 100)) If $q > 750 Then $q = -20 EndIf If $q > Random(0, 1000)Then ControlMove($guititle, "", "Static16", Random(0, 950), $r) $r += Random(0, 1000) Sleep(Random(0, 100)) If $r > 750 Then $r = -20 EndIf If $r > Random(0, 1000)Then ControlMove($guititle, "", "Static17", Random(0, 950), $t) $t += Random(0, 1000) Sleep(Random(0, 100)) If $t > 750 Then $t = -20 EndIf If $t > Random(0, 1000)Then ControlMove($guititle, "", "Static18", Random(0, 950), $u) $u += Random(0, 1000) Sleep(Random(0, 100)) If $u > 750 Then $u = -20 EndIf EndFunc ;<=end starlight screensaver=<< Func _timestop() AdlibUnRegister("_timer") EndFunc ;<=end timestop=<< Func _RainFall() ;Library ControlMove($guititle, "", "Static21", Random(200, 800, 1), 0) Local $xPos = ControlGetPos($guititle, "", "Static21") Local $sx = 0 While $sx < 780 $sx += 10 Local $Ret = (ControlMove($guititle, "", "Static21", $xPos[0], $sx)) Sleep(1) If(@error)Or(Not $Ret)Then Return SetError(1, 0, 0) WEnd Return $Ret EndFunc ;<=end rainfall=<<
UEZ Posted August 5, 2011 Posted August 5, 2011 I've shorten your script a little bit: expandcollapse popup#NoTrayIcon #cs======Discription====== CreateDate:4/8/2011 Name:StarLight ScreenSaver Library:_RainFall() DesignBy:sak2005 #ce======================= #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Include <Date.au3> #include <Timers.au3> Opt("MustDeclareVars", 1) Global $guititle = 'StarLight ScreenSaver' MouseMove($guititle, 800, 800) GUICreate($guititle, @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0x000000) Global $stars = 18 Global $step = 50 Global $aLabel[$stars][2] For $i = 0 To $stars - 1 $aLabel[$i][0] = GUICtrlCreateLabel("*", 100 + $stars, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) $aLabel[$i][1] = -20 $step += 50 Next Global $idNow = GUICtrlCreateLabel(_Now(), 850, 730, 150, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 11, 600, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) Global $idInfo = GUICtrlCreateLabel("Design by:sak2005", 850, 750, 150, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) Global $idRain = GUICtrlCreateLabel("'", 400, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUISetState() Global $idle_n, $idle_o Do $idle_n = _Timer_GetIdleTime() If $idle_n < $idle_o Then GUIDelete() Exit EndIf $idle_o = $idle_n _timer() Until False Func _timer() Local $i If WinActive($guititle)Then GUICtrlSetData($idNow, _Now()) Sleep(10) EndIf For $i = 0 To $stars - 1 If ControlMove($guititle, "", $aLabel[$i][0] , Random(0, 950), $aLabel[$i][1])Then $aLabel[$i][1] += Random(0, 1000) Sleep(Random(0, 100)) If $aLabel[$i][1] > 750 Then $aLabel[$i][1] = -20 EndIf Next If @SEC = 29 Or @SEC = 59 Then _RainFall() EndIf EndFunc ;<=end starlight screensaver=<< Func _RainFall() ;Library ControlMove($guititle, "", $idRain, Random(200, 800, 1), 0) Local $xPos = ControlGetPos($guititle, "", $idRain) Local $sx = 0 While $sx < 780 $sx += 10 Local $Ret = (ControlMove($guititle, "", $idRain, $xPos[0], $sx)) Sleep(1) If(@error)Or(Not $Ret)Then Return SetError(1, 0, 0) WEnd Return $Ret EndFunc ;<=end rainfall=<< Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
newsak2005 Posted August 5, 2011 Author Posted August 5, 2011 (edited) Thanks UEZ. New modify rainfall to starfall. expandcollapse popup#NoTrayIcon #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Include <Date.au3> #include <Timers.au3> #Include <WinAPI.au3> Opt("MustDeclareVars", 1) Global $guititle = 'StarLight ScreenSaver' MouseMove($guititle, 800, 800) GUICreate($guititle, @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0x000000) Global $stars = 18 Global $step = 50 Global $aLabel[$stars][2] For $i = 0 To $stars - 1 $aLabel[$i][0] = GUICtrlCreateLabel("*", 100 + $stars, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) $aLabel[$i][1] = -20 $step += 50 Next Global $idNow = GUICtrlCreateLabel(_Now(), 850, 730, 150, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 11, 600, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) Global $idInfo = GUICtrlCreateLabel("Design by:sak2005", 850, 750, 150, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUISetState() Global $idle_n, $idle_o Do $idle_n = _Timer_GetIdleTime() If $idle_n < $idle_o Then GUIDelete() Exit EndIf $idle_o = $idle_n _timer() Until False Func _timer() Local $i GUICtrlSetData($idNow, _Now()) Sleep(1) For $i = 0 To $stars - 1 If ControlMove($guititle, "", $aLabel[$i][0] , Random(0, 950), $aLabel[$i][1])Then $aLabel[$i][1] += Random(0, 950) Sleep(Random(10, 100)) If $aLabel[$i][1] > 780 Then $aLabel[$i][1] = -20 EndIf Next If @SEC = 15 Or @SEC = 30 Or @SEC = 45 Or @SEC = 60 Then _SwitchStarFall() EndIf EndFunc Func _SwitchStarFall() Local $ctlID = Random(0, 18) Local $xPos = Random(0, 950) Local $yPos = Random(0, 780) While $yPos < 780 $yPos += 10 ControlMove($guititle, "", $ctlID, $xPos, $yPos, 15, 15) Sleep(1) WEnd EndFunc ============================================================= ADD Stars hit the ghost. expandcollapse popup#NoTrayIcon #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Include <Date.au3> #include <Timers.au3> #Include <WinAPI.au3> Opt("MustDeclareVars", 1) Global $guititle = 'StarLight ScreenSaver' MouseMove($guititle, 800, 800) GUICreate($guititle, @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP);, $WS_EX_TOPMOST) GUISetBkColor(0x000000) Global $stars = 18 Global $step = 50 Global $aLabel[$stars][2] For $i = 0 To $stars - 1 $aLabel[$i][0] = GUICtrlCreateLabel("*", 100 + $stars, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) $aLabel[$i][1] = -20 $step += 50 Next GUICtrlCreateLabel("*", -20, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlCreateLabel("*", 780, 780, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) Global $idNow = GUICtrlCreateLabel(_Now(), 850, 730, 150, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 11, 600, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) Global $idInfo = GUICtrlCreateLabel("Design by:sak2005", 850, 750, 150, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUISetState() Global $idle_n, $idle_o Do $idle_n = _Timer_GetIdleTime() If $idle_n < $idle_o Then GUIDelete() Exit EndIf $idle_o = $idle_n _timer() Until False Func _timer() Local $i GUICtrlSetData($idNow, _Now()) Sleep(1) For $i = 0 To $stars - 1 If ControlMove($guititle, "", $aLabel[$i][0] , Random(0, 950), $aLabel[$i][1])Then $aLabel[$i][1] += Random(0, 950) Sleep(Random(10, 100)) If $aLabel[$i][1] > 780 Then $aLabel[$i][1] = -20 EndIf Next If @SEC = 00 Or @SEC = 15 Or @SEC = 30 Or @SEC = 45 Then _SwitchStarFall() EndIf _GhostStar() EndFunc Func _SwitchStarFall() Local $ctlID = Random(0, 18) Local $xPos = Random(0, 950) Local $yPos = Random(0, 780) While $yPos < 780 $yPos += 10 ControlMove($guititle, "", $ctlID, $xPos, $yPos, 15, 15) Sleep(1) WEnd EndFunc Func _GhostStar() Global $iMove, $sMove If @SEC = 20 Then For $iMove = -20 To 780 Step 10 ControlMove($guititle, "", "Static19", $iMove, $iMove, 15, 15) Sleep(1) Next EndIf If @SEC = 40 Then For $sMove = 780 To -20 Step -10 ControlMove($guititle, "", "Static20", $sMove, $sMove, 15, 15) Sleep(1) Next EndIf EndFunc ============================================================ Modify. ADD wwww popup. expandcollapse popup#NoTrayIcon #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Include <Date.au3> #include <Timers.au3> #Include <WinAPI.au3> Opt("MustDeclareVars", 1) Global $guititle = 'StarLight ScreenSaver' Global $hGUI = GUICreate($guititle, @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0x000000) Global $stars = 24 Global $step = 50 Global $aLabel[$stars][2] For $i = 0 To $stars - 1 $aLabel[$i][0] = GUICtrlCreateLabel("*", 100 + $stars, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) $aLabel[$i][1] = -20 $step += 50 Next GUICtrlCreateLabel("*", -20, -20, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlCreateLabel("*", 950, 950, 15, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 12, 800, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) Global $idNow = GUICtrlCreateLabel(_Now(), 850, 730, 150, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 11, 600, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) Global $idInfo = GUICtrlCreateLabel("Design by:sak2005", 850, 750, 150, 15, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 8, 400, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUISetState() Global $childtitle = 'LOGO' Global $hCHILD = GUICreate($childtitle, 243, 32, 0, -30, BitOR _ ($WS_MINIMIZEBOX,$WS_SYSMENU,$WS_POPUP,$WS_GROUP,$WS_CLIPSIBLINGS), BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE)) GUISetBkColor(0x000000) Global $Lbl = GUICtrlCreateLabel("www.autoitscript.com", 0, 0, 241, 29, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 16, 400, 0, "Tahoma") GUICtrlSetColor(-1, 0xFFFFFF) GUISwitch($hGUI) GUISetState() MouseMove($guititle, 800, 0) Global $idle_n, $idle_o Do $idle_n = _Timer_GetIdleTime() If $idle_n < $idle_o Then GUIDelete() Exit EndIf $idle_o = $idle_n _timer() Until False Func _timer() Local $i GUICtrlSetData($idNow, _Now()) Sleep(1) For $i = 0 To $stars - 1 If ControlMove($guititle, "", $aLabel[$i][0] , Random(0, 950), $aLabel[$i][1])Then $aLabel[$i][1] += Random(0, 950) Sleep(Random(10, 60)) If $aLabel[$i][1] > 780 Then $aLabel[$i][1] = -20 EndIf Next If @SEC = 00 Or @SEC = 15 Or @SEC = 30 Or @SEC = 45 Then _SwitchStarFall() EndIf _GhostStar() If @SEC = 10 Then GUISwitch($hCHILD) GUISetState(@SW_SHOW, $hCHILD) WinSetTrans($childtitle, "", 0) WinMove($childtitle, "", 400, 300) For $i = 0 To 255 Step 3 WinSetTrans($childtitle, "", $i) Sleep(1) Next ElseIf @SEC = 50 Then For $i = 255 To 0 Step -3 WinSetTrans($childtitle, "", $i) Sleep(1) Next EndIf EndFunc Func _SwitchStarFall() Local $ctlID = Random(0, 18) Local $xPos = Random(0, 950) Local $yPos = Random(0, 780) While $yPos < 780 $yPos += 10 ControlMove($guititle, "", $ctlID, $xPos, $yPos, 15, 15) Sleep(1) WEnd EndFunc Func _GhostStar() Global $sMove, $iMove = -20 Switch @SEC Case 20 While $iMove < 780 $iMove += 10 ControlMove($guititle, "", "Static22", $iMove, $iMove, 15, 15) Sleep(1) WEnd Case 40 For $sMove = 950 To -20 Step -10 ControlMove($guititle, "", "Static23", $sMove, $sMove, 15, 15) Sleep(1) Next EndSwitch EndFunc Edited August 6, 2011 by newsak2005
JohnOne Posted August 5, 2011 Posted August 5, 2011 MouseMove($guititle, 800, 800) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
wakillon Posted August 8, 2011 Posted August 8, 2011 Why stars stay to the left part of the screen ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
newsak2005 Posted August 10, 2011 Author Posted August 10, 2011 (edited) TimerScreenSaver. Use function DLL. MuuseClick ExitApp. expandcollapse popup#include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Include <Date.au3> HotKeySet("{ESC}", "_hkExit") Opt("MustDeclareVars", 1) Global $hGUI, $hCHILD _main() Func _main() $hGUI = GUICreate("TimerScreenSaver", @DesktopWidth, @DesktopHeight,-1, -1) GUISetBkColor(0x000000) GUICtrlCreateLabel(StringFormat("%02i:%02i:%02i", @HOUR, @MIN, @SEC)&' :APM', 285, 400, 400, 50, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 35, 600, 0, "Arial") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlCreatePic(@ProgramFilesDir&"\AutoIt3\Examples\GUI\mslogo.jpg", 350, 250, 255, 40) GUICtrlCreateLabel("STANDBY", 330, 300, 300, 50, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 35, 800, 0, "Arial") GUICtrlSetColor(-1, 0xFF0000) GUICtrlCreateLabel(_DateDayOfWeek( @WDAY, 1 )&' '& _DateTimeFormat( _NowCalc(),1), 285, 350, 400, 50, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 20, 400, 0, "Arial") GUICtrlSetColor(-1, 0xC0DCC0) GUISetState() $hCHILD = GUICreate("LOGO", 330, 50, 310, -50, BitOR($WS_MINIMIZEBOX,$WS_SYSMENU,$WS_POPUP,$WS_GROUP,$WS_CLIPSIBLINGS)) GUISetBkColor(0x000000) GUICtrlCreateLabel("www.autoitscript.com", 0, 0, 308, 41, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FF00) GUISwitch($hGUI) GUISetState() EndFunc AdlibRegister("_TickTime", 1000) Do Until GUIGetMsg()=$GUI_EVENT_PRIMARYDOWN Func _TickTime() If @SEC = 29 Then _SplashTextTransOn() If @SEC = 59 Then _SplashTextTransOff() _SystemTime() EndFunc Func _SystemTime() ;set Text time. Local $hTime Switch @HOUR Case @HOUR > 12 $hTime = ':PM' Case Else $hTime = ':AM' EndSwitch Local $Ttime = StringFormat("%02i:%02i:%02i", @HOUR, @MIN, @SEC) Local $Rtime = DllCall("AutoItX3.dll", "int", _ "AU3_ControlSetText", "str", _ "TimerScreenSaver", "str", _ "", "str", _ "Static1", "str", $Ttime&' '&$hTime) If @error <> 0 Or Not $Rtime Then Return SetError(1, 0, 0) Return $Rtime EndFunc #cs=Func _SystemDate() Local $day Switch @WDAY Case 1 $day = 'Su' Case 2 $day = 'Mo' Case 3 $day = 'Tu' Case 4 $day = 'We' Case 5 $day = 'Th' Case 6 $day = 'Fr' Case 7 $day = 'Sa' EndSwitch Local $TableDate = ($day&'/'&@MDAY&'/'&@MON&'/'&@YEAR) If Not $TableDate Then Return SetError(1, 0, 0) Return $TableDate #ce=EndFunc Func _SplashTextTransOn() GUISwitch($hCHILD) GUISetState(@SW_SHOW, $hCHILD) _WinMove(_WinGetPosX()+325, _WinGetPosY()+220, 330, 50) For $i = 0 To 255 Step 5 DllCall("AutoItX3.dll", "int", "AU3_WinSetTrans", "str", "LOGO", "str", "", "long", $i) Sleep(1) Next If Not @error Then Return 0 EndFunc Global $X, $Y, $W, $H Func _WinMove($X, $Y, $W, $H) Local $mRet = DllCall("AutoItX3.dll", "int", _ "AU3_WinMove", "str", _ "LOGO", "str", "", "long", _ $X, "long", _ $Y, "long", _ $W, "long", $H) If @error Or Not $mRet Then Return SetError(1, 0, 0) Return $mRet EndFunc Func _WinGetPosX() Local $PosX = DllCall("AutoItX3.dll", "int", "AU3_WinGetPosX", "str", "TimerScreenSaver", "str", "") If @error Or Not $PosX[0] Then Return SetError(1, 0, 0) Return $PosX[0] EndFunc Func _WinGetPosY() Local $PosY = DllCall("AutoItX3.dll", "int", "AU3_WinGetPosY", "str", "TimerScreenSaver", "str", "") If @error Or Not $PosY[0] Then Return SetError(1, 0, 0) Return $PosY[0] EndFunc Func _SplashTextTransOff() Local $x For $x = 255 To 0 Step -5 DllCall("AutoItX3.dll", "int", "AU3_WinSetTrans", "str", "LOGO", "str", "", "long", $x) Sleep(1) Next _WinMove(_WinGetPosX(), _WinGetPosY(), 330, 50) If Not @error Then Return 0 EndFunc Func _hkExit() Exit EndFunc =========================================================== Modify ticktime. Use Init Diff Loop. expandcollapse popup#include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Include <Date.au3> HotKeySet("{ESC}", "_hkExit") Opt("MustDeclareVars", 1) Opt("GUIOnEventMode", 1) Global $hGUI, $hCHILD _main() Func _main() $hGUI = GUICreate("TimerScreenSaver", @DesktopWidth, @DesktopHeight,-1, -1) GUISetOnEvent($GUI_EVENT_PRIMARYDOWN, "_ExitApp") GUISetBkColor(0x000000) GUICtrlCreateLabel(StringFormat("%02i:%02i:%02i", @HOUR, @MIN, @SEC)&' :APM', 285, 400, 400, 50, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 35, 600, 0, "Arial") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlCreatePic(@ProgramFilesDir&"\AutoIt3\Examples\GUI\mslogo.jpg", 350, 250, 255, 40) GUICtrlCreateLabel("STANDBY", 330, 300, 300, 50, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 35, 800, 0, "Arial") GUICtrlSetColor(-1, 0xFF0000) GUICtrlCreateLabel(_DateDayOfWeek( @WDAY, 1 )&' '& _DateTimeFormat( _NowCalc(),1), 285, 350, 400, 50, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 20, 400, 0, "Arial") GUICtrlSetColor(-1, 0xC0DCC0) GUISetState() $hCHILD = GUICreate("LOGO", 330, 50, 310, -50, BitOR($WS_MINIMIZEBOX,$WS_SYSMENU,$WS_POPUP,$WS_GROUP,$WS_CLIPSIBLINGS)) GUISetBkColor(0x000000) GUICtrlCreateLabel("www.autoitscript.com", 0, 0, 308, 41, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FF00) GUISwitch($hGUI) GUISetState() EndFunc AdlibRegister("_TickTime") Do Sleep(10) Until False Func _TickTime() Local $begin = TimerInit() Sleep(1000) Local $dif = TimerDiff($begin) Local $i = 0 While 1 $i += 1 If $dif <> 0 Then _SystemTime() Sleep($dif) If $i = 59 Then $i = -1 ElseIf $i = 15 Then _SplashTextTransOn() ElseIf $i = 45 Then _SplashTextTransOff() EndIf EndIf WEnd EndFunc Func _SystemTime() ;set Text time. Local $hTime Switch @HOUR Case @HOUR > 12 $hTime = ':PM' Case Else $hTime = ':AM' EndSwitch Local $Ttime = StringFormat("%02i:%02i:%02i", @HOUR, @MIN, @SEC) Local $Rtime = DllCall("AutoItX3.dll", "int", _ "AU3_ControlSetText", "str", _ "TimerScreenSaver", "str", _ "", "str", _ "Static1", "str", $Ttime&' '&$hTime) If @error <> 0 Or Not $Rtime Then Return SetError(1, 0, 0) Return $Rtime EndFunc Func _SplashTextTransOn() GUISwitch($hCHILD) GUISetState(@SW_SHOW, $hCHILD) _WinMove(_WinGetPosX()+325, _WinGetPosY()+220, 330, 50) For $i = 0 To 255 Step 5 DllCall("AutoItX3.dll", "int", "AU3_WinSetTrans", "str", "LOGO", "str", "", "long", $i) Sleep(1) Next If Not @error Then Return 0 EndFunc Global $X, $Y, $W, $H Func _WinMove($X, $Y, $W, $H) Local $mRet = DllCall("AutoItX3.dll", "int", _ "AU3_WinMove", "str", _ "LOGO", "str", "", "long", _ $X, "long", _ $Y, "long", _ $W, "long", $H) If @error Or Not $mRet Then Return SetError(1, 0, 0) Return $mRet EndFunc Func _WinGetPosX() Local $PosX = DllCall("AutoItX3.dll", "int", "AU3_WinGetPosX", "str", "TimerScreenSaver", "str", "") If @error Or Not $PosX[0] Then Return SetError(1, 0, 0) Return $PosX[0] EndFunc Func _WinGetPosY() Local $PosY = DllCall("AutoItX3.dll", "int", "AU3_WinGetPosY", "str", "TimerScreenSaver", "str", "") If @error Or Not $PosY[0] Then Return SetError(1, 0, 0) Return $PosY[0] EndFunc Func _SplashTextTransOff() Local $x For $x = 255 To 0 Step -5 DllCall("AutoItX3.dll", "int", "AU3_WinSetTrans", "str", "LOGO", "str", "", "long", $x) Sleep(1) Next _WinMove(_WinGetPosX(), _WinGetPosY(), 330, 50) If Not @error Then Return 0 EndFunc Func _ExitApp() Exit EndFunc Func _hkExit() Exit EndFunc Edited August 10, 2011 by newsak2005
wakillon Posted August 10, 2011 Posted August 10, 2011 Display time is frozen AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now