Weihnachten Script Hilfe

  • Hallo Leute, Weihnachten steht vor der Tür, so dass ich ein Skript, das eine Botschaft, wie Merry christmas angezeigt wird irgendwo am Weihnachtstag und Silvester machen wollen, auch ich wollte ein Bild einbetten und legte es als Hintergrundbild auf eingestellten Zeit also. um das Hintergrundbild, wann die Zeit für das neue Jahr ändern zu müssen.
    Irgendwelche Hinweise ho, dies zu tun.


    Vielen Dank im Voraus


    Google Translation

  • wie ich das versteh:

    Er will ein Script welches eine Botschaft wie "Fröhliche Weihnachten" anzeigt. Diese ändert sich Zeitabhängig ( also Silvester steht dann guten Rutsch)
    Dazu soll sich noch das Hintergrundbild des Scriptes ändern. Auch Zeitabhängig.

    Und nun fragt er wo er sowas findet


    Google Translationiation

  • ...reine Spekulatius (äh, Spekulation ;)).
    Er könnte ja die "Date.au3"-Funktionen verwenden?

    -
    You can check out the functions in the "Date.au3"-include:

    e.g.

    [autoit]

    _Now()

    [/autoit]


    gives you the actual date and time

    (is mein englisch heute wieder toll...)

    Simon nörgelt, Simon nervt - aber Simon verbessert die Welt. Glaubt er.

  • Like this?

    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <date.au3>

    [/autoit][autoit][/autoit][autoit]

    $form = GUICreate("weihnachten?", 615, 438, 192, 124)
    GUISetState(@SW_SHOW)
    $button1 = GuiCtrlCreateButton("Klick me!",100,100)
    $label1 = GuiCtrlCreateLabel("",10,20,100,50)

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $button1
    Consolewrite(_NowDate())

    [/autoit][autoit][/autoit][autoit]

    if _nowdate() = "24.12.2012" Then
    GuiCtrlSetData($label1,"Weihnachtszeit weihnachtszeit sag allen bescheid das wenn Sido kommt und sack bei hat.... ") ; <= IF Christmas
    ElseIf _nowdate() = "01.01.2013" Then
    GuiCtrlSetData($label1,"Happy New Year!! HURRAY!!") ; <= IF New Year

    Else
    GuiCtrlSetData($label1,"Today: " & _nowdate())

    [/autoit][autoit][/autoit][autoit]

    EndIf

    [/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit]

    EndSwitch
    WEnd

    [/autoit]
  • Hi my friends sorry for the bad translation,and thank you that you are accepting a non German language.
    Well i completely new to AutoIt, there is a school sell i work,and i want to make for the kids a script
    with witch when the years changes it will popup a Happy new year or something and it will automatically change the desktop wallpaper with something about Christmas.

    Or a countdown timer that when reaches 1/1/2013 00:00 am will popup a message and maybe a song. Automatically .

    Forgive me to ask a lot but i will appreciate if you could help.

    Thanks in advance

    • Offizieller Beitrag

    Hey remora,

    there is also an english autoit forum out there: https://autoit.de/www.autoitscript.com/forum
    Your question is quite easy to answer. you have to check the date with an easy if condition. therefor you can use marcos like @year @mday and @mon and maybe the time (@hour...). to play a song take a look at SoundPlay in your helpfile, to show a message you could use msgbox and to change the wallpaper you could aks google.

    greets,
    Spider

  • Thanks for your help mate,i'll follow your advises,i will visit the en forum too.
    Thank you again :)

  • Hey remora,

    if you want to change the background you should try it with this here:

    [autoit]

    $Wallpaper = "...\blabla.jpg" ; for example
    $Stile = "Fit" ; yeah .. fit should say enough
    Select
    Case $Stile="Center"
    $Stile="0"
    $Stile2="0"
    Case $Stile="Fit"
    $Stile="1"
    $Stile2="0"
    Case $Stile="Stretch"
    $Stile="2"
    $Stile2="0"
    Case $Stile="Fill"
    $Stile="-1"
    $Stile2="0"
    Case $Stile="Tile"
    $Stile="0"
    $Stile2="1"
    EndSelect

    [/autoit][autoit][/autoit][autoit]

    RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "WallpaperStyle", "REG_SZ", $Stile)
    RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "TileWallpaper", "REG_SZ", $Stile2)
    DllCall("user32.dll", "int", "SystemParametersInfo","uint",20,"uint",0,"str",$Wallpaper,"uint",3)

    [/autoit]