Solved

Embed music into a script

Posted on 2009-04-06
4
226 Views
Last Modified: 2013-12-08
I am trying to embed a song into a login script.  I already have a picture pop up within a ie window.  Can someone tell me what I need to add to make sound too.  Thanks.
Option Explicit

 

Const cIMG = "<img src='file:\\Tmc0100dc01\SYSVOL\tmc.com\scripts\picture.jpg' border='1'>"

 

Dim oIEA : Set oIEA = CreateObject("InternetExplorer.Application")

With oIEA

  .ToolBar = 0

  .AddressBar =false

  .StatusBar = 0

  .Width = 490

  .Height = 430

  .Left = 0

  .Top = 0

  .MenuBar = false

  .Navigate "about:blank"

  While oIEA.Busy

  Wend

  .Document.Title = "Generic Text!!"

  .Document.Body.InnerHTML = cIMG

  .Visible = 1

End With 

 

WScript.Sleep 30 * 1000

 

On Error Resume Next 

oIEA.Quit

set oIEA = Nothing

Open in new window

0
Comment
Question by:KodiBear
  • 3
4 Comments
 
LVL 65

Expert Comment

by:RobSampson
ID: 24084325
Hi there....WAV files can be played:
http://www.microsoft.com/technet/scriptcenter/resources/qanda/nov04/hey1103.mspx

and other files could probably be played using WMPlayer, but I don't have any code accessible for that at the moment....

Regards,

Rob.
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 500 total points
ID: 24084335
Wait, check this page out for WMPlayer....
http://www.microsoft.com/technet/scriptcenter/funzone/player.mspx

Under this section:
Retrieving  and Playing  an Individual Song

'===============================
Set objPlayer = CreateObject("WMPlayer.OCX" )

Set objMediaCollection = objPlayer.MediaCollection
Set objTempList = objMediaCollection.getByName _
    ("I Hate Myself for Loving You")

Set objSong = objTempList.Item(0)
objPlayer.OpenPlayer(objSong.sourceURL)
'===============================

Regards,

Rob.
0
 

Author Closing Comment

by:KodiBear
ID: 31567347
Thank you.  I appreciate the help.
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 24091961
No problem. Thanks for the grade.

Regards,

Rob.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now