Solved

Embed music into a script

Posted on 2009-04-06
4
231 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 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

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…
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

717 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