[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Embed music into a script

Posted on 2009-04-06
4
Medium Priority
?
235 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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

831 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