README.TXT

ActiveX component that schedules a Broadcast Architecture show reminder. 
 
This Readme contains the following sections: 
* Summary Briefly describes the sample 
* More InformationDetails how to compile and run the sample 
* About SCHSAMPDescribes the sample in more detail. 
* Using SCHSAMPExplains how to use SCHSAMP from a Web page. 
 
For more information about how to write applications that schedule show reminders, see`` Scheduling Show Reminders `` in the Broadcast Architecture SDK documentation. 
 
SUMMARY 
========= 
The SCHSAMP sample, Schsamp.dll, is an ActiveX component that schedules a show reminder using the IScheduledItems interface available from Television System Services, Tssadmin.dll. TV Viewer is used to display the reminder dialog when the reminder runs. 
 
SCHSAMP was developed using Visual Basic 5.0. 
 
MORE INFORMATION 
================ 
Before you can compile or use this sample, you must first install the  
Broadcasting Architecture. This installs and registers 
Microsoft Television System Services and TV Viewer, both of which are  
required for SCHSAMP to run. 
 
The following information describes the SCHSAMP sample. 
 
To Compile SCHSAMP 
------------------- 
Open the SCHSAMP project file, Schsamp.vdp, in Visual Basic 5.0.  
From the File menu, select Make SchSamp.dll. 
 
To compile the component into a .Cab file for distribution  
on the internet, use the Application Setup Wizard provided with  
Visual Basic 5.0. Choose Create Internet Download Setup. 
 
This control is unsigned. If you wish to distribute a version of  
SCHSAMP on the Web you should sign the component. For instructions on  
how to sign a .Cab file, see the Internet Client SDK. 
 
To Set Up the Programming Environment 
---------------------------------------------------- 
First, create a new ActiveX DLL project. Set the class to global, multiuse. Then set a project reference to the Microsoft Television Services, Tssadmin.dll. This will give you access to the TelevisionServices, TaskTrigger, and ScheduledItems objects. If you are unable to locate Microsoft Television Services in References, check that the optional TV Viewer component of Microsoft(r) Windows(r) 98 is installed on your machine. 
You must also set a reference to Microsoft DAO 3.5 Object library. This enables your application to create the DAO workspace required by the ScheduledItems object. 
 
To Run SCHSAMP 
--------------- 
The SCHSAMP sample includes a version of the component that has already 
been compiled into a .Cab file for delivery through a web page. The .Cab  
file has not been signed, and thus in order to run the sample you must set  
security in Internet Explorer 4.0 to allow unsigned controls to run. 
 
To do this, go to the View menu and select Internet Options. Click the  
Security tab.  Set Security settings for the appropriate zone.  If you plan  
to run SCHSAMP from your machine, this should be Local Intranet zone. 
 
Once the security is properly set, open SHCSAMP.HTML with Internet Explorer 4.0. 
The SCHSAMP component will automatically download and install on your machine.  
To run the script that sets the show reminder, click the Schedule Reminder button. 
 
-------NOTE --------NOTE ----------NOTE ----------NOTE ---------NOTE --- 
Note that you cannot set a reminder for a show that has already occurred.  
The HTML Web currently is scripted to set a reminder for the show "Maid to Order" 
on 8/5/97 at 3:00PM. If the current date is after 8/5/97, the sample will not run.  
To correct this, edit the following lines of the HTML file: 
 
SchSamp.Episode = "Maid to Order" 
SchSamp.Network = "" 
SchSamp.Duration = "120" 
SchSamp.ShowTime = "8/5/97 3:00:00 PM" 
 
Change the preceeding lines to reflect a future episode.   
 
For best results, choose an episode from the  
TV Viewer program guide. This will enable SCHSAMP to match the episode in  
the Guide database and obtain description and tuning information. 
-------NOTE --------NOTE ----------NOTE ----------NOTE ---------NOTE --- 
 
Because SCHSAMP uses the IScheduledItems interface, you cannot use the  
Search page of TV Viewer to view a sample set with SCHSAMP. To test whether  
the reminder was set, follow the instructions detailed in Schsamp.htm. 
 
SCHSAMP Files 
-------------- 
SCHSAMP.HTML is an HTML/VBScript file uses SCHSAMP to set a show reminder. 
 
SCHSAMP.CAB contains a compiled version of SCHSAMP.              
 
SCHSAMP.VBP is the Visual Basic project file. 
 
SCHSAMP.CLS contains the Visual Basic class module 
 
ABOUT SCHSAMP  
=============== 
SchSamp is an ActiveX component that schedules a TV Viewer reminder for a broadcast show. At a specified amount of time before the show starts, the reminder will run, causing TV Viewer to display a dialog box to the user. It will state that the show is about to start, and offer the user the option to Tune to that channel. 
This component could be used, for example, on an television enhancement page to enable users to schedule a reminder for next week's episode.  
 
-------NOTE --------NOTE ----------NOTE ----------NOTE ---------NOTE --- 
Reminders that are set by any means other than ITVViewer::SetReminder cannot be viewed from the Search page of TV Viewer when a user selects MyReminders from the Categories list. Neither will a reminder icon appear in that program's details list. However, TV Viewer will still present a reminder dialog when the reminder runs. 
-------NOTE --------NOTE ----------NOTE ----------NOTE ---------NOTE --- 
 
USING SCHSAMP 
============== 
Because SchSamp is implemented as an ActiveX component, it can be called from a variety of programming environments, such as VBScript or Javascript on a Web page, Visual Basic, Java, or C++. The code examples in the following topics use Web-based VBScript to call SchSamp. 
 
-------NOTE --------NOTE ----------NOTE ----------NOTE ---------NOTE --- 
The SchSamp component is not signed. In order to run the sample you must set security in your browser to allow unsigned controls to run. For more information on how to do this, see the Readme.txt file installed with SchSamp. For information on how to sign a component for Internet download, see the Internet Client SDK. 
-------NOTE --------NOTE ----------NOTE ----------NOTE ---------NOTE --- 
 
The following topics describe how to create an instance of SchSamp, pass in episode data, and set a show reminder for the specified episode. 
 
Inserting SCHSAMP in a Web Page 
------------------------------------------------------ 
You can call the SchSamp component from a Web page. To create an instance of the component, insert the following object tag into the HTML file: 
 
<OBJECT ID="MySchSamp" 
CLASSID="CLSID:BE521C45-08DA-11D1-98AE-080009DC95C5" 
CODEBASE="SchSamp.CAB#version=1,0,0,0"> 
</OBJECT> 
  
 
Set the ID parameter to specify a name for this instance of the control.  In the preceding example, it is set to MySchSamp. The CLASSID parameter lists the unique identifier for the SchSamp class, and must appear exactly as above. The CODEBASE parameter points to the .Cab file that contains the compiled SchSamp component and its supporting files.  
 
Specifying Episode Data 
------------------------------- 
The SchSamp component contains the following properties.  
 
PropertyData typeDescription 
---------------------------------------- 
EpisodeStringTitle of the episode. 
NetworkStringIf applicable, the network on which the episode appears. 
DurationStringLength of the episode, in minutes. 
ShowTimeStringTime and date that the episode starts. 
PreTimeLongThe number of minutes early that the reminder should run. 
 
These properties store data about the episode for which you wish to set a reminder. You must set values for them before you call Schsamp.SetReminder to schedule the show reminder.  
The following example uses VBScript in a Web page to set values for the SchSamp properties.  
 
<SCRIPT LANGUAGE = VBScript> 
Sub SetIt_OnClick 
      'set the show's properties 
      SchSamp.Episode = "Maid to Order" 
      SchSamp.Network = "" 
      SchSamp.Duration = "120" 
      SchSamp.ShowTime = "8/5/97 3:00:00 PM" 
      SchSamp.PreTime = 5 
 
      'Schedule the reminder 
      SchSamp.SetReminder 
End Sub 
</SCRIPT> 
  
Note that you cannot set a reminder for a show that has already occurred. The HTML file installed with SchSamp is scripted to set a reminder for the show "Maid to Order" on 8/5/97 at 3:00PM. If the current date is after 8/5/97, the sample will not run. To correct this, edit the preceding lines to reflect a future episode: 
For best results, choose an episode from the TV Viewer program guide. This will enable SchSamp to match the episode in the Guide database and obtain description and tuning information. 
 
Scheduling the Show Reminder 
--------------------------------------- 
Once the properties of SchSamp are set as described in the Broadcast Architecture SDK documenation topic "Specifying Episode Data", call the SchSamp.SetReminder method to create the show reminder. This is illustrated in the following example. 
 
<SCRIPT LANGUAGE = VBScript> 
  'Schedule the reminder 
   SchSamp.SetReminder 
</SCRIPT>