Jump to content
Sign in to follow this  
Delta

Relaxing screensaver

Recommended Posts

Delta

They say necessity is the mother of all invention. I needed a way to relieve stress and this was the solution.

There is only one video right now but there are three types of audio. I don't have a fireplace so I had to pull the video from the web and edit it to my needs. The audio are Shoutcast radio stations so every now and again you might hear ads. However the most important thing is that you relax, I know I am.

#NoTrayIcon
#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.11.1 (beta)
 Author:         Deltaforce229

 Script Function:
    Creates a relaxing screensaver.

#ce ----------------------------------------------------------------------------

#include <_SS_UDF.au3>
#include <GUIConstants.au3>

$rss = "rss.ini"
$fireplace = "\fireplace.swf"

$VideoFile = IniRead($rss,"Settings","Video","Fireplace")
$VideoFile = StringReplace($VideoFile, "Fireplace", $fireplace)

$MusicUrl = IniRead($rss,"Settings","Music","Jazz")
$MusicUrl = StringReplace($MusicUrl, "Jazz", "http://64.92.199.69:8240/")
$MusicUrl = StringReplace($MusicUrl, "Classical", "http://72.13.81.178:9030/")
$MusicUrl = StringReplace($MusicUrl, "Zen", "http://91.121.5.74:8800/")

_SS_GUICreate()
_SS_SetConfigLoop("_SSConfig");
_SS_SetMainLoop("_SSLoop");
_SS_Start()

Func _SSLoop()
    ;Video
    FileInstall("C:\Dforce\autoit\RSS\fireplace.swf",@SystemDir&"\"&$fireplace,0)
    $Video = ObjCreate("ShockwaveFlash.ShockwaveFlash")
    GUICtrlCreateObj($Video, 0, 0, @DesktopWidth, @DesktopHeight)
    $Video.LoadMovie(0, @ScriptDir&$VideoFile)

    ;Audio
    $Music = ObjCreate("WMPlayer.OCX")
    $Music.URL = $MusicUrl
    $Music.controls.play()
    
    ;Loop
    Do
        If $_SS_IsPreview and not ProcessExists("rundll32.exe") Then ;Preview bug fix.
            Exit
        Endif
    Until _SS_ShouldExit()
EndFunc

Func _SSConfig()
    $ConfigGui = GUICreate("Configure Relaxing Screensaver",400,100)
    $SetVideo = GUICtrlCreateCombo("- Set Video -",10,10,380)
    GUICtrlSetData(-1,"Fireplace") 
    $SetMusic = GUICtrlCreateCombo("- Set Music -",10,40,380)
    GUICtrlSetData(-1,"Jazz|Classical|Zen")
    $Save = GUICtrlCreateButton("Save Settings",10,70)
    GUISetState()
    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE
                Exit
            Case $msg = $Save
                IniWrite($rss,"Settings","Video",GUICtrlRead($SetVideo))
                IniWrite($rss,"Settings","Music",GUICtrlRead($SetMusic))
        EndSelect
    Wend
EndFunc

Scr file was over Autoit's posting limits so I had to upload it to Filefront.

http://files.filefront.com/rssscr/;10250936;/fileinfo.html


[size="1"]Please stop confusing "how to" with "how do"[/size]

Share this post


Link to post
Share on other sites
ACS

Doesn't work for me; I don't see any video.

Where's the SWF file?

Share this post


Link to post
Share on other sites
gseller

Doesn't seem to know where to find _SS_UDF.au3 in 3.2.12.0... I like the fireplace.swf file tho, and the rss file that runs it. Nice music. Thanks :)

Share this post


Link to post
Share on other sites
gseller

Cool, Got it thanx!

Share this post


Link to post
Share on other sites
ACS

That's an SCR file. I'm looking for the SWF. The Flash animation.

Share this post


Link to post
Share on other sites
Delta

ugh just gotta make things difficult. when you run the scr file the swf file will install in your system32 directory. maybe sometime saturday when im not busy i'll upload the swf file separate.


[size="1"]Please stop confusing "how to" with "how do"[/size]

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×