Jump to content

Snow on your desktop


Dellairion
 Share

Recommended Posts

  • Replies 62
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I believe the reason it gets messed up when you change the desktop or open a gui is not in your script but in the dll.

I'm not sure how this is supposed to work but I get the pinkish background on in the snowflakes and they have no animation to them.

If you get the bugs worked out this will be awesome!!

O sweet!! jpam's last one worked for me perfectly!!!! :)^_^

Doesn't mess with the windows anymore but it still has a problem with the desktop.

Oops found a problem. When it stacks up on the screen and a window goes over it, it erases the stacked ones, so the newly stacked ones are hovering in mid air.

I think that problem wont be fixable because it will take up memory, but please feel free to prove me wrong!!

Pics:

Too High

Floating Snow

When it gets to the top

Edited by bam5

[center]JSON Encoding UDF[/center]

Link to comment
Share on other sites

none of your pics links are working !

but i know what you mean.

the stackup version copy the sprite to the background and makes a copy for the other sprites.

when you put a window in front nothing happens,

but when you destroy or minimize that window the desktop get a refresh message

so all sprite information that was allready on screen is destroyed

when new sprites arrived they have all the information to rebuild the screen,

but they falling not that low anymore to rebuild the lower region of the screen.

what you can do is catch a system message when a window is destroyed or minimized,

make a empty sprite as big as your screenwidth

catch the message from the system

let the big sprite move quickly from top to bottom rebuilding your screen.

:)

Link to comment
Share on other sites

Worked for me

And for me :)

if not ....... wait for the real snow falling from the sky

Well, it's not so relevant for me, i am leaving in the country where you never get see a snow ^_^ - well, if i go to the north i might see a little, but since i am in the center of the country (near the sea), i didn't see a snow like 5 years now (i did see it when i was in canada-toronto visiting my uncle 5 years ago).

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

@jpam

When you activate some window, the snow that was collected dissapear, but the snow start growing up on the bottom from higher point, because the $Stackup always increesing... so this will fix it i think (follow the comments above the new lines):

#cs
 for people who don't see any snow falling
 written in Autoit v3.2.4.9
 processor pentium Celeron 4 2.4 GHZ
 tested @ screen res 1024/768 and 1280/1024
 make sure you have the last prospeed.udf , http://www.autoitscript.com/forum/index.ph...t=0&start=0
 copy prospeed.udf in autoit/include or if you are using autoit beta in autoit/beta/include
 put prospeed.dll and snow.bmp in your scriptdir
 download prospeed.dll @ http://www.autoitscript.com/forum/index.ph...t=0&start=0
#ce

#include <Prospeed.au3>

HotKeySet("{Esc}","_Exit")

WinMinimizeAll()

screencopie()
;Sleep(50) ; If you have a fast computer try sleep here 

$M_load = loadsprite("snow.bmp")
; If you get black sprite's ,get the "snow.bmp" at early post and specify path to it

;InitPixelEffects() ; If you don't see any snow falling try commenting "InitPixelEffects()" and SetPixelEffect below
;Sleep(50) ; If you have a fast computer try sleep here

Dim $sp[400]
Dim $format[4]
$format[1] = 0
$format[2] = 27
$format[3] = 54
$p1 = 1

$DefaultStackup = 45 ;I added this one, so we always can restore defaults
$Stackup = $DefaultStackup

For $i = 1 To 49
    $r = Random(1,3,1)
    $sp[$i] = sprite($M_load, $format[$r], 0, 27, 27, 1, 1, 1, Random(0,@DesktopWidth,1)-13, Random(0,200,1))
    Select
        Case $r = 1
            setspritespeed($sp[$i],3,3)
        Case $r = 2
            setspritespeed($sp[$i],2,2)
        Case $r = 3 
            setspritespeed($sp[$i],1,1)
    EndSelect
    $x = GetSpriteX($sp[$i])
    movesprite($sp[$i], $x, @DesktopHeight - $Stackup)
    Sleep(250)
Next

While 1
    For $i = 1 To 49
        ;And i added this line, so we can erase the $Stackup counter every time that other window then desktop is activated
        If Not WinActive("[CLASS:Progman]") Then $Stackup = $DefaultStackup 
        
        $hasarrived = HasSpriteArrived($sp[$i])
        If $hasarrived = 1 Then
            SpriteToHDC($sp[$i])
            Sleep(5)
            MarkSprite($sp[$i],1)
            deletesprite($sp[$i])
            cleanup(1)
            $r = Random(1,3,1)
            $sp[$i] = sprite($M_load, $format[$r], 0, 27, 27, 1, 1, 1, Random(0,@DesktopWidth,1)-13, Random(0,10,1))
            If $r = 1 Then setspritespeed($sp[$i],3,3)
            If $r = 2 Then setspritespeed($sp[$i],2,2)
            If $r = 3 Then setspritespeed($sp[$i],1,1)
            $x = GetSpriteX($sp[$i])
            movesprite($sp[$i], $x, @DesktopHeight - $Stackup)
        EndIf
    Next
    If $p1 = 15 Then
        SetPixelEffect(Random(1,@DesktopWidth,1), -100, 0xffffff, 160, 3, 2, 100, 1, 100) ; If you don't see any snow falling comment this line and InitPixelEffects()
        $Stackup +=1
        $p1 = 1
    EndIf
    $p1 +=1
    Sleep(250)
WEnd

Func _Exit()
    WinMinimizeAllUndo()
    ControlSend("[CLASS:Progman]", "", "SysListView321", "{F5}")
    Exit
EndFunc

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

that's a good solution !

it's working fine overhere :)

it's strange that the pixeleffect does not work on some computers ^_^

I had the same problem at school and on my own computer... weard that some people actually see it. (tested on vista ultimate and xp pro)

Sry for being away for so long but had other things to do also.

I'm going to update the first post in a sec (i've added the last version of the snow thing).

Edited by Dellairion
Link to comment
Share on other sites

GUIList.au3 is not in the AutoIt release anymore.. Renamed to GUIListBox.au3

Fixed version:

; Remake of Snow for Windows
; By Dellairion (with alot of help from jpam :P)
;
;
; Changelog:
;   - Snow is actually falling down on your desktop
;   - Added config file
;   - Open windows don't get fucked up anymore
;
; Known Issues:
;   - GUI is not fully active yet :P (only number of snowflakes is working)
;   - If you change your desktop background the snow will erase it.
;

_Singleton(@ScriptName)


#Include <GuiListBox.au3>
#include <Constants.au3>
#include <GUIConstants.au3>
#include "include\prospeed.au3"

; OPTIONS
Opt("RunErrorsFatal",  0)
Opt("GUICloseOnESC",   0)
Opt("GUIOnEventMode",  1)
Opt("TrayMenuMode",    1)
Opt("TrayOnEventMode", 1)



; VARIABLES
$V_ConfigFile = "config.ini"
$V_Username   = @UserName

$V_Snowflakes             = 20   ; Default
$V_Stepsize               = 3    ; Default
$V_Snowlayer_Windows      = 15   ; Default
$V_Snowlayer_ScreenBottom = 20   ; Default
$V_WhirlFactor            = 5    ; Default
$V_FalldownSpeed          = 10   ; Default

$V_Snowflakes_Min         = 1
$V_Snowflakes_Max         = 200
$V_Stepsize_Min           = 1
$V_Stepsize_Max           = 20
$V_Snowlayer_Windows_Min  = 0
$V_Snowlayer_Windows_Max  = 500
$V_Snowlayer_ScreenBottom_Min = 0
$V_Snowlayer_ScreenBottom_Max = 500
$V_WhirlFactor_Min        = 0
$V_WhirlFactor_Max        = 100
$V_FalldownSpeed_Min      = 1
$V_FalldownSpeed_Max      = 50

$V_PixelEffect              = 1
$V_Snowlayer_DefaultStackup = 0 ; Set this to 0 if you don't see any snow falling down.
$V_Snowlayer_Stackup        = $V_Snowlayer_DefaultStackup

;$V_Snowflake_WaitFalldown = 100 ; ms

Dim $sp[$V_Snowflakes_Max+1]

$Image_SnowflakesDifferent = 12
$Image_SnowflakesSize      = 15

$i = 1
Dim $format[$Image_SnowflakesDifferent+1]
Do
    $format[$i] = $Image_SnowflakesSize*$i-$Image_SnowflakesSize
    $i += 1
Until $i > $Image_SnowflakesDifferent



; TEMPORARY VARIABLES
$V_Snowflakes_Temp = 0
;$V_Snowflake_FalldownTimer = TimerInit()



; CONFIGFILE
If Not FileExists($V_ConfigFile) Then
    IniWrite($V_ConfigFile, $V_Username, "Snowflakes",             $V_Snowflakes)
    IniWrite($V_ConfigFile, $V_Username, "Stepsize",               $V_Stepsize)
    IniWrite($V_ConfigFile, $V_Username, "Snowlayer_Windows",      $V_Snowlayer_Windows)
    IniWrite($V_ConfigFile, $V_Username, "Snowlayer_ScreenBottom", $V_Snowlayer_ScreenBottom)
    IniWrite($V_ConfigFile, $V_Username, "WhirlFactor",            $V_WhirlFactor)
    IniWrite($V_ConfigFile, $V_Username, "FalldownSpeed",          $V_FalldownSpeed)
Else
    $V_Snowflakes               = IniRead($V_ConfigFile, $V_Username, "Snowflakes",             $V_Snowflakes)
    $V_Stepsize                 = IniRead($V_ConfigFile, $V_Username, "Stepsize",               $V_Stepsize)
    $V_Snowlayer_Windows        = IniRead($V_ConfigFile, $V_Username, "Snowlayer_Windows",      $V_Snowlayer_Windows)
    $V_Snowlayer_ScreenBottom   = IniRead($V_ConfigFile, $V_Username, "Snowlayer_ScreenBottom", $V_Snowlayer_ScreenBottom)
    $V_WhirlFactor              = IniRead($V_ConfigFile, $V_Username, "WhirlFactor",            $V_WhirlFactor)
    $V_FalldownSpeed            = IniRead($V_ConfigFile, $V_Username, "FalldownSpeed",          $V_FalldownSpeed)
EndIf

 


; TRAY GUI
$T_OpenConfigPannel = TrayCreateItem("Open Configuration Pannel")
$T_Exit = TrayCreateItem("Exit")
; END TRAY GUI


; GUI
$GUI_Main = GUICreate("Snow for Windows v2.0 bèta", 633, 447, 193, 115)
;GUISetFont(9, 400, 2, "Arial")

$G_Snow_Settings = GUICtrlCreateGroup("Snow Settings", 8, 0, 433, 401)
GUICtrlSetFont(-1, 11, 400, 2, "Papyrus")

$L1 = GUICtrlCreateLabel("Number of snowflakes ("                 &$V_Snowflakes_Min&"-"            &$V_Snowflakes_Max&")",             96, 30,  239, 20)
$L2 = GUICtrlCreateLabel("Stepsize ("                             &$V_Stepsize_Min&"-"              &$V_Stepsize_Max&")",               96, 60,  235, 20)
$L3 = GUICtrlCreateLabel("Thickness snowlayers on windows ("      &$V_Snowlayer_Windows_Min&"-"     &$V_Snowlayer_Windows_Max&")",      96, 90,  266, 20)
$L4 = GUICtrlCreateLabel("Thickness snowlayers at screen bottom ("&$V_Snowlayer_ScreenBottom_Min&"-"&$V_Snowlayer_ScreenBottom_Max&")", 96, 120, 295, 20)
$L5 = GUICtrlCreateLabel("Whirl factor ("                         &$V_WhirlFactor_Min&"-"           &$V_WhirlFactor_Max&")",            97, 150, 120, 20)
$L6 = GUICtrlCreateLabel("Falldown speed ("                       &$V_FalldownSpeed_Min&"-"         &$V_FalldownSpeed_Max&")",          96, 180, 140, 20)

$L_SnowFlakesCount                = GUICtrlCreateList("", 24, 30,  65, 23, $WS_BORDER+$WS_VSCROLL+$LBS_NOSEL) ; $LBS_NOINTEGRALHEIGHT
$L_SnowFlakesStepsize             = GUICtrlCreateList("", 24, 60,  65, 23, $WS_BORDER+$WS_VSCROLL+$LBS_NOSEL)
$L_SnowFlakesLayersOnWindows      = GUICtrlCreateList("", 24, 90,  65, 23, $WS_BORDER+$WS_VSCROLL+$LBS_NOSEL)
$L_SnowFlakesLayersOnScreenBottom = GUICtrlCreateList("", 24, 120, 65, 23, $WS_BORDER+$WS_VSCROLL+$LBS_NOSEL)
$L_SnowFlakesWhirlFactor          = GUICtrlCreateList("", 24, 150, 65, 23, $WS_BORDER+$WS_VSCROLL+$LBS_NOSEL)
$L_SnowFlakesFalldownSpeed        = GUICtrlCreateList("", 24, 180, 65, 23, $WS_BORDER+$WS_VSCROLL+$LBS_NOSEL)

GUICtrlCreateGroup("", -99, -99, 1, 1)

$B_DefaultSettings  = GUICtrlCreateButton("Default Settings", 10, 416, 113, 25)
$B_Exit     = GUICtrlCreateButton("Exit",   152, 416, 113, 25)
$B_Cancel   = GUICtrlCreateButton("Cancel", 272, 416, 113, 25)
$B_Apply    = GUICtrlCreateButton("Apply",  392, 416, 113, 25)
$B_OK       = GUICtrlCreateButton("OK",     512, 416, 113, 25)


GUICtrlSetFont($L1, 10, 400, 2, "Tahoma")
GUICtrlSetFont($L2, 10, 400, 2, "Tahoma")
GUICtrlSetFont($L3, 10, 400, 2, "Tahoma")
GUICtrlSetFont($L4, 10, 400, 2, "Tahoma")
GUICtrlSetFont($L5, 10, 400, 2, "Tahoma")
GUICtrlSetFont($L6, 10, 400, 2, "Tahoma")
GUICtrlSetFont($L_SnowFlakesCount,                11, 400, 2, "Perpetua")
GUICtrlSetFont($L_SnowFlakesStepsize,             11, 400, 2, "Perpetua")
GUICtrlSetFont($L_SnowFlakesLayersOnWindows,      11, 400, 2, "Perpetua")
GUICtrlSetFont($L_SnowFlakesLayersOnScreenBottom, 11, 400, 2, "Perpetua")
GUICtrlSetFont($L_SnowFlakesWhirlFactor,          11, 400, 2, "Perpetua")
GUICtrlSetFont($L_SnowFlakesFalldownSpeed,        11, 400, 2, "Perpetua")

GUICtrlSetData($L_SnowFlakesCount,                GenerateList($V_Snowflakes_Min,             $V_Snowflakes_Max))
GUICtrlSetData($L_SnowFlakesStepsize,             GenerateList($V_Stepsize_Min,               $V_Stepsize_Max))
GUICtrlSetData($L_SnowFlakesLayersOnWindows,      GenerateList($V_Snowlayer_Windows_Min,      $V_Snowlayer_Windows_Max))
GUICtrlSetData($L_SnowFlakesLayersOnScreenBottom, GenerateList($V_Snowlayer_ScreenBottom_Min, $V_Snowlayer_ScreenBottom_Max))
GUICtrlSetData($L_SnowFlakesWhirlFactor,          GenerateList($V_WhirlFactor_Min,            $V_WhirlFactor_Max))
GUICtrlSetData($L_SnowFlakesFalldownSpeed,        GenerateList($V_FalldownSpeed_Min,          $V_FalldownSpeed_Max))

_GUICtrlListBox_SelectString($L_SnowFlakesCount,                " "&$V_Snowflakes&" ")
_GUICtrlListBox_SelectString($L_SnowFlakesStepsize,             " "&$V_Stepsize&" ")
_GUICtrlListBox_SelectString($L_SnowFlakesLayersOnWindows,      " "&$V_Snowlayer_Windows&" ")
_GUICtrlListBox_SelectString($L_SnowFlakesLayersOnScreenBottom, " "&$V_Snowlayer_ScreenBottom&" ")
_GUICtrlListBox_SelectString($L_SnowFlakesWhirlFactor,          " "&$V_WhirlFactor&" ")
_GUICtrlListBox_SelectString($L_SnowFlakesFalldownSpeed,        " "&$V_FalldownSpeed&" ")

;GUISetState(@SW_SHOW, $GUI_Main)
; END GUI



; LOAD SNOW
#cs
$GUI_Snow = GUICreate("Snow", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_LAYERED)
$L_SnowBackground = GUICtrlCreateLabel("", 0, 0, @DesktopWidth, @DesktopHeight)
GUICtrlSetBkColor($L_SnowBackground, 0xff00ff)
;GUICtrlSetState(@SW_LOCK, $GUI_Snow)
;GUISetState(@SW_DISABLE, $GUI_Snow)
GUISetState(@SW_SHOW, $GUI_Snow)
Background("", 0, 0, @DesktopWidth, @DesktopHeight)
DllCall("user32.dll", "long", "SetLayeredWindowAttributes", "hwnd", $GUI_Snow, "long", 0x00ff00ff, "long", 255, "long", 1)
;LoadImage(@ScriptDir&"\Files\snowflake13.gif", 0, 0, 0, 0, 1)
$Snowflake_Load = loadsprite(@ScriptDir&"\Files\snowflake13.gif")
$Snowflake = Sprite($Snowflake_Load, 0, 0, 15, 15, 1, 1, 0, $Snowflake_X, $Snowflake_Y)
;WinSetOnTop($GUI_Snow, "", 1)
#ce

WinMinimizeAll()
$Snowflake_Load = loadsprite("Files\snow.bmp")
screencopie()
If $V_Snowlayer_DefaultStackup Then InitPixelEffects()
;WinMinimizeAllUndo()
GUISetState(@SW_SHOW, $GUI_Main)

; END LOAD SNOW



; ON EVENT
GUISetOnEvent($GUI_EVENT_CLOSE, "CloseConfigPannel")
GUICtrlSetOnEvent($B_Exit,      "Close")
GUICtrlSetOnEvent($B_Apply,     "ApplyConfig")
GUICtrlSetOnEvent($B_OK,        "ApplyCloseConfigPannel")

TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE, "OpenConfigPannel")
TrayItemSetOnEvent($T_OpenConfigPannel,   "OpenConfigPannel")
TrayItemSetOnEvent($T_Exit,               "Close")
; END ON EVENT



While 1
    If $V_Snowlayer_DefaultStackup Then PixelEffect()
    
    ;If TimerDiff($V_Snowflake_FalldownTimer) >= $V_Snowflake_WaitFalldown Then
        Snowflakes()
    ;   $V_Snowflake_FalldownTimer = TimerInit()
    ;EndIf
WEnd


; FUNCTIONS
Func Close()
    ;WinMinimizeAllUndo()
    ControlSend("[CLASS:Progman]", "", "SysListView321", "{F5}")
    Exit
EndFunc


Func OpenConfigPannel()
    GUISetState(@SW_SHOW, $GUI_Main)
EndFunc

Func CloseConfigPannel()
    GUISetState(@SW_HIDE, $GUI_Main)
EndFunc


Func GenerateList($min, $max)
    $output = ""
    $i = $max
    Do
        $output &= "| "&$i&" "
        $i -= 1
    Until $i < $min
    Return $output
EndFunc


Func ApplyConfig()
    $V_Snowflakes             = $V_Snowflakes_Max             - StringReplace(_GUICtrlListBox_GetTopIndex($L_SnowFlakesCount),                " ", "")
    $V_Stepsize               = $V_Stepsize_Max               - StringReplace(_GUICtrlListBox_GetTopIndex($L_SnowFlakesStepsize),             " ", "")
    $V_Snowlayer_Windows      = $V_Snowlayer_Windows_Max      - StringReplace(_GUICtrlListBox_GetTopIndex($L_SnowFlakesLayersOnWindows),      " ", "")
    $V_Snowlayer_ScreenBottom = $V_Snowlayer_ScreenBottom_Max - StringReplace(_GUICtrlListBox_GetTopIndex($L_SnowFlakesLayersOnScreenBottom), " ", "")
    $V_WhirlFactor            = $V_WhirlFactor_Max            - StringReplace(_GUICtrlListBox_GetTopIndex($L_SnowFlakesWhirlFactor),          " ", "")
    $V_FalldownSpeed          = $V_FalldownSpeed              - StringReplace(_GUICtrlListBox_GetTopIndex($L_SnowFlakesFalldownSpeed),        " ", "")
    
    IniWrite($V_ConfigFile, $V_Username, "Snowflakes",             $V_Snowflakes)
    IniWrite($V_ConfigFile, $V_Username, "Stepsize",               $V_Stepsize)
    IniWrite($V_ConfigFile, $V_Username, "Snowlayer_Windows",      $V_Snowlayer_Windows)
    IniWrite($V_ConfigFile, $V_Username, "Snowlayer_ScreenBottom", $V_Snowlayer_ScreenBottom)
    IniWrite($V_ConfigFile, $V_Username, "WhirlFactor",            $V_WhirlFactor)
    IniWrite($V_ConfigFile, $V_Username, "FalldownSpeed",          $V_FalldownSpeed)
EndFunc

Func ApplyCloseConfigPannel()
    ApplyConfig()
    CloseConfigPannel()
EndFunc


Func Snowflakes()
    If $V_Snowflakes_Temp <> $V_Snowflakes Then
        
        ConsoleWrite($V_Snowflakes&" "&$V_Snowflakes_Temp)
        If $V_Snowflakes > $V_Snowflakes_Temp Then
            $i = 0
            Do
                $i += 1
                CreateSnowflake($V_Snowflakes_Temp+$i)
            Until $i = StringReplace($V_Snowflakes-$V_Snowflakes_Temp, "-", "")
            
        Else
            $i = -1
            Do
                $i += 1
                DeleteSnowflake($V_Snowflakes_Temp-$i)
            Until $i+1 = StringReplace($V_Snowflakes-$V_Snowflakes_Temp, "-", "")
            
        EndIf
    EndIf
    
    For $i = 1 to $V_Snowflakes
        $hasarrived = HasSpriteArrived($sp[$i])
        If $hasarrived = 1 Then
            ; erase the $Stackup counter every time that other window then desktop is activated
            If Not WinActive("[CLASS:Progman]") Then $V_Snowlayer_Stackup = $V_Snowlayer_DefaultStackup
            
            SpriteToHDC($sp[$i])
            DeleteSnowflake($i)
            CreateSnowflake($i)
        EndIf
    Next
    
    $V_Snowflakes_Temp = $V_Snowflakes
    Sleep(20)
EndFunc


Func CreateSnowflake($n)
    $r1 = Random(1, $Image_SnowflakesDifferent, 1)
    $h1 = Random(15, 50, 1)
    $sp[$n] = sprite($Snowflake_Load, $format[$r1], 0, $Image_SnowflakesSize, $Image_SnowflakesSize, 1, 1, 1, Random(1,@DesktopWidth, 1), -$h1)
    
    $r2 = Random(1, 3, 1)
    setspritespeed($sp[$n], $r2, $r2)
    
    $x = GetSpriteX($sp[$n])
    movesprite($sp[$n], $x, @DesktopHeight-$V_Snowlayer_Stackup-Round($Image_SnowflakesSize/2, 0))
EndFunc

Func DeleteSnowflake($n)
    MarkSprite($sp[$n], $n)
    DeleteSprite($sp[$n])
    CleanUp(1)
EndFunc


Func PixelEffect()
    If $V_PixelEffect = 15 Then
        SetPixelEffect(Random(1,@DesktopWidth,1), -100, 0xffffff, 160, 3, 2, 100, 1, 100) ; If you don't see any snow falling comment this line and InitPixelEffects()
        $V_Snowlayer_Stackup +=1
        $V_PixelEffect = 1
    EndIf
    $V_PixelEffect +=1
    Sleep(250)
EndFunc
; END FUNCTIONS
Edited by Manadar
Link to comment
Share on other sites

Error opening the file.

You should use AutoIt 3.2.8.1 for this script to work!

Or use the fixed(?) version by Manadar... but...

@Manadar

It seems that this fixed version have some issues too :P

The snow is have-black, i mean, the image is like splited with black background.

Or i am doing something wrong? all resources are in place :)

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

@Manadar

It seems that this fixed version have some issues too :P

The snow is have-black, i mean, the image is like splited with black background.

Or i am doing something wrong? all resources are in place :)

I just renamed the old functions to the new functions. They supposedly do the same thing, but with a different name.

I haven't changed anything else..

Link to comment
Share on other sites

@Manadar

I just renamed the old functions to the new functions

Oh i see, i thought that you tested it, sorry.

Some of the new functions are needs to be adapted, and not only the names, paramters and returned values changed as well (in some of the functions).

@jpam

AutoIt version v3.2.4.9

We talking about the new AutoIt version (3.2.10.0), in 3.2.8.1 also all works fine.

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

@Manadar

Oh i see, i thought that you tested it, sorry.

Some of the new functions are needs to be adapted, and not only the names, paramters and returned values changed as well (in some of the functions).

Beeeeep. Wrong. The functions just have been renamed.

I haven't mentioned testing at all.I have adapted the script, and it works fine for me.

Talk to the original authors to solve your problem.

Link to comment
Share on other sites

Beeeeep. Wrong. The functions just have been renamed.

I am talking not only about functions in this particular script :) , i mean that there is function that are needs to be changed not only in names.

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

  • 11 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...