?
Solved

Embed music into a script

Posted on 2009-04-06
4
Medium Priority
?
232 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

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…
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Suggested Courses

770 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