The download file "MEDIA.TXT" (for EXPERT TEXT GLOBAL - 'Windows' v2.17 and later) below illustrates all the scripts on this page. You can also download MEDIA.TXT using EXPERT TEXT GLOBAL: simply select Download and then enter www.codelexicon.com/MEDIA.TXT. Or if you are using www.codelexicon.org.uk, enter www.codelexicon.org.uk/MEDIA.TXT.
RIGHT CLICK HERE and select Save Link As to download MEDIA.TXT

Programming EXPERT TEXT GLOBAL
  EXPERT TEXT GLOBAL v2.14 (and later) supports additional JavaScript in order to open applications, load local and remote graphics and to load local and remote WAV audio files. These are added using JavaScrupt in the conclusions of the Knowledge base. The scripts can be run by selecting Forward (or Reference Forward Chain). Expert Text Global is described fully in our book Expert Text Explained, which you can order on the Expert Text Global page.

Adding Graphics
EXPERT TEXT GLOBAL allows you to add .BMP graphics (that are local or from the Internet) to the conclusions using JavaScript. To open the Graphics you simply select Forward and select the appropriate fact that corresponds with the conclusion that holds the graphic.  The following JavaScript scripts show how to add local and internet BMP graphics:

<script type="text/javascript">
{
document.write('<IMG SRC="www.codelexicon.com/images/logo.bmp">');
}
</script>

or,

<script type="text/javascript">
{
document.write('<IMG SRC="C:/images/logo.bmp">');
}
</script>


The Graphics may be scrolled in the Graphic Window by holding the left mouse button and dragging the graphic. There are also Zoom tools to alter the size of the graphic - but to use Zoom you must include HEIGHT and WIDTH parameters as shown below. The dimensions (in pixels) are not restricted, and EXPERT TEXT GLOBAL is able to download any size graphic.

NOTE: Using the downloads 2.14 (and earlier) you must leave "two" spaces between the graphic file name and "WIDTH".

<script type="text/javascript">
{
document.write('<IMG SRC="C:/images/logo.bmp"  WIDTH=300 HEIGHT=600>');
}
</script>

OR,

<script type="text/javascript">
{
document.write('<IMG SRC="C:/images/logo.bmp"  WIDTH=200 HEIGHT=400>');
}
</script>



The EXPERT TEXT GLOBAL DEVELOPER'S SOURCE package provides software companies with the current EXPERT TEXT GLOBAL source code, together with a licence to develop it into a new AI product. Code Lexicon is available to assist your development program and to help you with your initial evaluation of EXPERT TEXT GLOBAL and its technical potential. Further information can be obtained by contacting us.

 

 

 

 

 

 

Opening Java applications using EXPERT TEXT GLOBAL v2.17 Windows version (and later)
(Important note: the shown script is not standard, and it is used to open
  the Code Lexicon Java Media Player.)

<html>
 <head>
   <title> Open method Example </title>
     <script  type="text/javascript">
    function windowOpen(){
      window.open("C:/Program Files\Media Player\player.jar");
    }
     </script>
 </head>
 <body>
<input type="button" value="Open a new window"
      onClick="windowOpen();">
 </body>
</html>

Opening Word Document (and documents) using EXPERT TEXT GLOBAL v2.17 Windows version (and later)

(Important note: the shown script is not standard.)

Example 1.

<html>
<head>
<title> Open method Example </title>
<script type="text/javascript">
function windowOpen(){
window.open("C:/mortgage\Customer Relations.docx");
}
</script>
</head>
<body>
<input type="button" value="Open a new window"
onClick="windowOpen();">
</body>
</html>


Example 2.

<html>
 <head>
   <title> Open method Example </title>
     <script  type="text/javascript">
    function windowOpen(){
      window.open("C:/Program Files\Batch/init.doc");
    }
     </script>
 </head>
 <body>
<input type="button" value="Open a new window"
      onClick="windowOpen();">
 </body>
</html>


Opening Web Pages using EXPERT TEXT GLOBAL v2.17 Windows version (and later) 
<html>

<head>

<title> Code Lexicon open URL </title>

<script type="text/javascript">

function windowOpen(){

window.open("http://www.codelexicon.com");

}

</script>

</head>

<body>

<input type="button" value="Open URL"

onClick="windowOpen();">

</body>

</html>  
 

Opening Applications
To open applications using the knowledge base select Forward and choose the appropriate fact to open the application.

EXPERT TEXT GLOBAL can open external applications (like NotePad) by adding the following script to a conclusion:


<script language="javascript">

function RunCommand(RunApplication)

{

var externalprogram = new ActiveXObject("WScript.Shell");

externalprogram.Run(RunApplication);

}

</script>

</head>

// Using Expert Text Global the following application is opened automatically - without clicking

<body>

<a href="#" onclick="RunCommand('C:/Windows\\Notepad.exe');return false;">Notepad</a>

</body>





 

 

 


 

 

 

Adding WAV audio using the Media Object

Local and remote WAV audio files can be added to conclusions using the following standard OBJECT code:

<OBJECT id="Media Player" width="320" height="240"

style="position:absolute; left:0;top:0;"

CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"

type="application/x-oleobject"

<PARAM NAME="URL" VALUE="http://www.handystamper.com/media/slow.wav>

<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">

<PARAM NAME="AutoStart" VALUE="True">

<PARAM name="uiMode" value="none">

<PARAM name="PlayCount" value="9999">

<PARAM name="TransparantAtStart" VALUE="True">

<PARAM name="AnimationAtStart " VALUE="True">

</OBJECT>


<OBJECT id="Media Player" width="320" height="240"

style="position:absolute; left:0;top:0;"

CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"

type="application/x-oleobject"

<PARAM NAME="URL" VALUE="C:/slow.wav">

<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">

<PARAM NAME="AutoStart" VALUE="True">

<PARAM name="uiMode" value="none">

<PARAM name="PlayCount" value="9999">

<PARAM name="TransparantAtStart" VALUE="True">

<PARAM name="AnimationAtStart " VALUE="True">

</OBJECT>


The Media Player is hidden from view when playing WAV files.




EXPERT TEXT GLOBAL v2.14 (and later) supports additional JavaScript in order to open applications, load local and remote graphics and to load local and remote WAV audio files. These are added using JavaScrupt in the conclusions of the Knowledge base. Expert Text Global is described fully in our book Expert Text Explained, which you can order on the Expert Text Global page.

Adding Graphics
EXPERT TEXT GLOBAL allows you to add .BMP graphics (that are local or from the Internet) to the conclusions using JavaScript. To open the Graphics you simply select Forward and select the appropriate fact that corresponds with the conclusion that holds the graphic.  The following JavaScript scripts show how to add local and internet BMP graphics:

<script type="text/javascript">
{
document.write('<IMG SRC="www.codelexicon.com/images/logo.bmp">');
}
</script>

or,

<script type="text/javascript">
{
document.write('<IMG SRC="C:/images/logo.bmp">');
}
</script>

The Graphics may be scrolled in the Graphic Window by holding the left mouse button and dragging the graphic. There are also Zoom tools to alter the size of the graphic - but to use Zoom you must include HEIGHT and WIDTH parameters as shown below. The dimensions (in pixels) are not restricted, and EXPERT TEXT GLOBAL is able to download any size graphic.

<script type="text/javascript">
{
document.write('<IMG SRC="C:/images/logo.bmp" WIDTH=300 HEIGHT=600>');
}
</script>

OR,

<script type="text/javascript">
{
document.write('<IMG SRC="C:/images/logo.bmp" WIDTH=200 HEIGHT=400>');
}
</script>



 

 

 

 

 

 

Opening Applications 
To open applications using the knowledge base select Forward and choose the appropriate fact to open the application.

EXPERT TEXT GLOBAL can open external applications (like NotePad) by adding the following script to a conclusion:

<script language="javascript">

function RunCommand(RunApplication)

{

var externalprogram = new ActiveXObject("WScript.Shell");

externalprogram.Run(RunApplication);

}

</script>

</head>

// Using Expert Text Global the following application is opened automatically - without clicking

<body>

<a href="#" onclick="RunCommand('C:\\Windows\\Notepad.exe');return false;">Notepad</a>

</body>