?? wvsetup.ht0
字號:
<html><head><title>Setting up WVSCRIPT</title></head><body bgcolor="#FFFFFF"><p><a href="../index.htm">Catalog of documents</a><h1 align=center>Setting up WVSCRIPT</h1><h2>Contents</h2><ul><li> <a href="#adding">Adding the <tt>xws</tt> file type to the Windows registry</a><li> <a href="#helper">Registering <tt>wvscript</tt> as a Netscape helper</a><li> <a href="#how">How <tt>wvscript</tt> works</a><li> <a href="#caution">Multiple instances of <strong>wview</strong>: use with caution</a></ul><p>This document describes how to set up <tt>wvscript</tt>, a ``wrapper'' for <ahref="../wag/wview-1.htm"><strong>WVIEW</strong></a> that provides Windowsusers with some of the functionality that <tt>wavescript</tt> and <ahref="../wug/wug.htm"> <strong>WAVE</strong></a> provide to Linux, Solaris, andSunOS users. Specifically, <tt>wvscript</tt> can be installed as a<i>viewer</i> for your Web browser and for Windows 95 Explorer by following thesteps outlined below. Once you have done so, you can follow links such as thisone: <br> <a href="example.xws"> <img src="wave.png" alt="click here to viewwaveforms"></a><p>If you are using Windows 95 and Netscape 3.x, you should be able to followthe steps exactly as shown here. If you use another version of Windows oranother browser, you will need to adapt these instructions to your situation.If you use Linux, Solaris, or SunOS, then use <strong>WAVE</strong> and<tt>wavescript</tt>, not <strong>WVIEW</strong> and <tt>wvscript</tt>.<p>Before performing the steps here, please install the WFDB Software Package and<strong>WVIEW</strong> as described in the <a href="../about.htm#mswin">Quickstart notes for MS-Windows</a>.<a name="adding"><h2>Adding the <tt>xws</tt> file type to the Windows registry</h2></a><p>Double-click on the <strong>My computer</strong> icon, and open the<strong>Options</strong> dialog box (from the <i>View</i> menu). Click on the<i>File Types</i> tab, and on the <i>Add new type...</i> button. The<strong>Add New File Type</strong> dialog appears.<br><img src="addnft1.png"><br>Fill in the text fields of this dialog box exactly as shown above. (Note thatthe MIME type is <tt>application/x-wavescript</tt>, not<tt>application/x-wvscript</tt>.) When you have finished, define an action byclicking on <i>New...</i>. The <strong>New Action</strong> dialog appears.<p><img src="addnft2.png"><br>Again, fill in the text fields as shown. If you did not install the WFDBapplications in <tt>c:\bin</tt>, provide the correct path to <tt>wvscript</tt>.When you have done so, click on <i>OK</i>.<p><i>Optional:</i> If you wish to set the icon for <tt>xws</tt> files, click on<i>Change Icon...</i> in the <strong>Add New File Type</strong> dialog. Awarning message will appear when you do so:<br><img src="addnft3.png"><br>Dismiss the message box by clicking on <i>OK</i>. The <strong>ChangeIcon</strong> dialog appears.<br><img src="addnft4.png"><br>Enter the path to the <strong>WVIEW</strong> executable file (normally asshown above), then click on <i>OK</i>.<p>To record your changes, click on <i>OK</i> in the <strong>Add New FileType</strong> dialog box. Once you have done so, try out <tt>wvscript</tt>and <strong>WVIEW</strong> by opening the directory in which this page ofinstructions is found using Windows Explorer. Within Explorer, double-clickon the file <tt>example.xws</tt>; this should cause an MS-DOS window toappear briefly (when <tt>wvscript</tt> runs); <strong>WVIEW</strong> shouldthen display record 100s, with annotator <tt>atr</tt>, beginning at 0:22 (asspecified in <tt>example.xws</tt>). If this does not happen, check theprevious steps carefully and correct the problem before continuing.<a name="helper"><h2>Registering <tt>wvscript</tt> as a Netscape helper</h2></a><p>Start Netscape. Open the <strong>Preferences</strong> dialog from the<i>Options</i> menu, and click on the <i>Helpers</i> tab.<p><img src="addnft5.png"><br>Click on <i>Create New Type...</i> to open the <strong>New Type</strong>dialog.<p>In the <strong>New Type</strong> dialog, specify <tt>application</tt> as theMIME type, and <tt>x-wavescript</tt> as the MIME subtype; then click on<i>OK</i>.<p>In the <strong>Preferences</strong> dialog, select <i>Launch theApplication</i> as the action, and enter the correct path for the<tt>wscript</tt> executable, as shown below.<p><img src="addnft6.png"><p>When you have finished, click on <i>OK</i> to register your changes. Youmay now test your setup by clicking on the icon below:<br><a href="example.xws"><img src="wave.png" alt="click here to view waveforms"></a><p>The first time you do this, Netscape may open a message box to warn you thatrunning software from untrusted sources may compromise your system's security.This warning may be safely ignored in this case.<h3>Note for Netscape Communicator 4.0 users</h3><p>The procedure for adding a helper application is slightly different than shownabove if you are using Netscape Communicator 4.0, since the menus have beenreorganized. The <strong>Preferences</strong> dialog is now opened from the<i>Edit</i> menu. Select <i>Navigator/Applications</i> from the<strong>Preferences</strong> dialog to open the <i>Helpers</i> page, then clickon <i>New Type</i> to open the <strong>New Type</strong> dialog.<p>The <strong>New Type</strong> dialog for Netscape 4.0 contains these fields:<dl><dt><i>Description of type</i></dt><dd>enter <tt>WAVEScript</tt>, or any other description of yourchoice</dd><dt><i>File extension</i></dt><dd>enter <tt>xws</tt></dd><dt><i>MIME Type</i></dt><dd>(rather than separate type and subtype fields)enter <tt>application/x-wavescript</tt></dd><dt><i>Application to use</i></dt><dd>enter <tt>c:/bin/wavescript.exe</tt></dd></dl>After filling in these fields, click on the <i>OK</i> buttons in the <strong>New Type</strong> and <strong>Preferences</strong> dialogs to register yourchanges.<a name="how"><h2>How <tt>wvscript</tt> works</h2></a><p>To embed a link such as those shown above in your own web pages, simply insertHTML code such as:<pre> <a href="example.xws"> <img src="wave.png" alt="click here to view waveforms"></a></pre>The file <tt>example.xws</tt>, to which this link refers, is a text file thatlooks like this:<pre> # file: example.xws # # Sample `wavescript' script. Use this script by the command # wavescript example.xws # (under UNIX), or # wvscript example.xws # (under MS-Windows). # # The first character in each action line in a wavescript script begins with # a `-'; any other lines are ignored. Only one action may appear on any line. -r 100s -a atr -f 0:22</pre>The contents of <tt>example.xws</tt> specify the record to be opened (in thiscase, <tt>100s</tt>), the annotator to be opened (in this case, <tt>atr</tt>),and the starting time of the segment to be displayed (in this case,<tt>0:22</tt>).<p>When <tt>wvscript</tt> is invoked (whether by Netscape, Windows Explorer, orfrom the command line) it reads the script file named by its first command-lineargument, extracts the record name, annotator name, and starting time, andinvokes <strong>WVIEW</strong>. If the annotator name is not specified in thescript, <tt>wvscript</tt> uses `<tt>-</tt>' as the annotator name passed to<strong>wview</strong>; this special ``annotator'' is ignored by<strong>WVIEW</strong>. The source for <tt>wvscript</tt> (<tt>wvscript.c</tt>)may be found in the <tt>app</tt> directory of the WFDB Software Package, if youwish to modify it.<p>Note that the syntax of <tt>wavescript</tt> scripts allows for more than onerecord to be specified, using an action line of the form<pre> -r 100+101+102</pre>Although <strong>WAVE</strong> (under UNIX) can open more than one record(in this case, it would open records 100, 101, and 102 in separate windows),<strong>WVIEW</strong> cannot do this. <tt>wvscript</tt> identifies thefirst record name in such an action line, and invokes <strong>WVIEW</strong>so as to open that record only.<a name="caution"><h2>Multiple instances of <strong>WVIEW</strong>: use with caution</h2><p>Another difference between UNIX <tt>wavescript</tt> and Windows<tt>wvscript</tt> is that <tt>wvscript</tt> will always launch a newinstance of <strong>WVIEW</strong> even if <strong>WVIEW</strong> is alreadyrunning, whereas <tt>wavescript</tt> starts a new <strong>WAVE</strong>process only if <strong>WAVE</strong> is not already running. Multipleinstances of <strong>WVIEW</strong> running at the same time can interferewith each other and should generally be avoided.<p>Only one instance of <strong>WVIEW</strong> can be run reliably at a time,because of limitations in using 16-bit large memory model DLLs such as theversion of the WFDB library used by <strong>WVIEW</strong>. For this reason,you should normally be careful to exit from <strong>WVIEW</strong> beforestarting another copy of it, whether from Netscape, Windows Explorer, orthe command line.<p>It is possible, however, to run multiple copies of <strong>WVIEW</strong>,<em>provided that all copies have the same record and annotator (ifany) open.</em> This can be useful if you wish to compare two or more segmentsof a record side-by-side, and it is for this reason that multiple instances of<strong>WVIEW</strong> are allowed. If you use this feature, close (iconify)any instances that are no longer needed, rather than quitting (exiting). Toexit cleanly, make sure that all instances have been closed, then quit eachinstance without reopening the window (this is necessary since repainting thewindow requires rereading the signal and annotation files, which cannot be doneonce they have been closed by the action of quitting any instance of<strong>WVIEW</strong>).<p>If you encounter problems related to interference between simultaneousinstances of <strong>WVIEW</strong>, the only solution may be to use theWindows Task Manager to quit from all instances of <strong>WVIEW</strong>.If necessary, you can open the Task Manager window by pressing the <i>Control</i>, <i>Alt</i>, and <i>Delete</i> keys simultaneously (if your system hasbecome unresponsive, wait for up to 20 seconds, then press <i>Control</i>,<i>Alt</i>, and <i>Delete</i> once again).<BR> <HR><P><I><ADDRESS><I><A HREF="mailto:george@mit.edu">George B. Moody (<tt>george@mit.edu</tt>)</A></ADDRESS></I><BR>7 May 1999</body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -