' Set Your Favorite Webcam as WallPaper
' Using Vbsedit's free Toolkit
Dim fso
Set fso = WScript.CreateObject("Scripting.Filesystemobject")
Set objShell = CreateObject( "WScript.Shell" )
resourceLocation=objShell.ExpandEnvironmentStrings("%LOCALAPPDATA%") & "\Vbsedit\Resources\"
GetUrl resourceLocation & "lameije2400.txt","https://www.skaping.com/lagrave/2400m"
imgpath=""
Set f= fso.OpenTextFile(resourceLocation & "lameije2400.txt",1)
Do While Not(f.AtEndOfStream)
l=f.ReadLine
pos=InStr(l,"new ImageMedia(""//")
If pos>0 Then
imgpath=Mid(l,19)
pos2=InStr(imgpath,".jpg")
imgpath=Left(imgpath,pos2+3)
End If
Loop
f.Close
GetUrl resourceLocation & "lameije2400.jpg","https://" & imgpath
Dim img
Set img = WScript.CreateObject("Vbsedit.ImageProcessor")
img.Load resourceLocation & "lameije2400.jpg"
img.Crop 5700,1080,img.ScreenWidth,img.ScreenHeight
img.Transparency=0.85
img.Color="Black"
img.DrawRectangle 0,0,img.Width,20
img.Transparency=0
img.Color="White"
img.FontFamily="Courier New"
img.DrawText imgpath,0,0
img.Save resourceLocation & "ventelon.jpg"
img.SetDesktopWallpaper resourceLocation & "ventelon.jpg","#1681D3"
Sub GetUrl(path,url)
Set http = CreateObject("Msxml2.XMLHTTP")
http.open "GET", url, FALSE
http.send ""
Set stream = CreateObject("ADODB.Stream")
stream.Open
stream.Type = 1 'adTypeBinary
stream.Write http.responseBody
stream.Position = 0
stream.SaveToFile path,2
stream.Close
End Sub