Using Comet Script Files
From CometWiki
Line 1: | Line 1: | ||
'''Comet Script Files''' | '''Comet Script Files''' | ||
- | + | '''Overview''' | |
- | + | ||
- | Overview | + | |
''Starting with Build 306 of Comet2002, you can launch Comet or CometAnywhere via a Comet Script File.'' | ''Starting with Build 306 of Comet2002, you can launch Comet or CometAnywhere via a Comet Script File.'' | ||
Line 11: | Line 9: | ||
You can launch a Comet Script File from Windows Explorer, from a desktop shortcut, or from a web page hyperlink. This latter feature is where Comet Script Files really shine. Imagine clicking on a link on a web page and, as a result, launching a Comet or CometAnywhere session. | You can launch a Comet Script File from Windows Explorer, from a desktop shortcut, or from a web page hyperlink. This latter feature is where Comet Script Files really shine. Imagine clicking on a link on a web page and, as a result, launching a Comet or CometAnywhere session. | ||
- | Launching Comet | + | '''Launching Comet''' |
To launch Comet via a Comet Script File, you'll need to create a two-line text file that contains the following commands: | To launch Comet via a Comet Script File, you'll need to create a two-line text file that contains the following commands: | ||
- | WorkDir= | + | WorkDir= |
- | + | Command= | |
- | Command= | + | |
The WorkDir= command identifies the working directory where the COSW.EXE program is located (also known as the "Start in" directory), and Command= specifies the command line option(s) for Comet. For example, the following commands identify c:\comet as the working directory, and specify the profile name (/pn), Comet Security Server auto-start (/sec), and maximize (/max) startup options: | The WorkDir= command identifies the working directory where the COSW.EXE program is located (also known as the "Start in" directory), and Command= specifies the command line option(s) for Comet. For example, the following commands identify c:\comet as the working directory, and specify the profile name (/pn), Comet Security Server auto-start (/sec), and maximize (/max) startup options: | ||
- | WorkDir=c:\comet | + | WorkDir=c:\comet |
- | + | Command=/pn=node1 /sec /max | |
- | Command=/pn=node1 /sec /max | + | |
Save the Comet Script File with a .CSW extension. For the sake of this example, suppose we save the file using the following path: | Save the Comet Script File with a .CSW extension. For the sake of this example, suppose we save the file using the following path: | ||
Line 43: | Line 39: | ||
To launch CometAnywhere via a Comet Script File, you'll need to create a one-line text file that contains the following command: | To launch CometAnywhere via a Comet Script File, you'll need to create a one-line text file that contains the following command: | ||
- | Command= | + | Command= |
This specifies the command line option(s) for CometAnywhere. For example, the following command specifies the /net and /max options: | This specifies the command line option(s) for CometAnywhere. For example, the following command specifies the /net and /max options: | ||
- | Command=/net:255.255.255.255 /max | + | Command=/net:255.255.255.255 /max |
Save the Comet Script File with a .CSW extension. For the sake of this example, suppose we save the file using the following path: | Save the Comet Script File with a .CSW extension. For the sake of this example, suppose we save the file using the following path: | ||
Line 63: | Line 59: | ||
Thus, when you click on the "Launch CometAnywhere" hyperlink, the browser launches the c:\cometanywhere.csw script file, which starts CometAnywhere. | Thus, when you click on the "Launch CometAnywhere" hyperlink, the browser launches the c:\cometanywhere.csw script file, which starts CometAnywhere. | ||
- | Replaying Keystrokes | + | '''Replaying Keystrokes''' |
You can automate this process even further by using the /keyfile command line option. This option replays keystrokes from a text file when you start the COSW.EXE program. | You can automate this process even further by using the /keyfile command line option. This option replays keystrokes from a text file when you start the COSW.EXE program. | ||
Line 69: | Line 65: | ||
For example, suppose you want to automate your Comet password entry and then run a customer inquiry program. You could create a text file that contains the keystrokes for these actions. In the following example, "PASSWORD" represents your Comet password, "CINQ" is the name of the customer inquiry program, and the two blank lines represent the Enter key being pressed after each action. | For example, suppose you want to automate your Comet password entry and then run a customer inquiry program. You could create a text file that contains the keystrokes for these actions. In the following example, "PASSWORD" represents your Comet password, "CINQ" is the name of the customer inquiry program, and the two blank lines represent the Enter key being pressed after each action. | ||
- | PASSWORD | + | PASSWORD |
+ | CINQ | ||
+ | |||
- | |||
Suppose we save this keystroke file using the following path: | Suppose we save this keystroke file using the following path: | ||
Line 79: | Line 76: | ||
You could then add the /keyfile command to your Comet Script File, as follows: | You could then add the /keyfile command to your Comet Script File, as follows: | ||
- | WorkDir=c:\comet | + | WorkDir=c:\comet |
- | + | Command=/pn=node1 /sec /max /keyfile=c:\login.txt | |
- | Command=/pn=node1 /sec /max /keyfile=c:\login.txt | + | |
Launching this script file starts Comet and replays the keystrokes from the c:\login.txt file. Thus, you could click on a web page hyperlink and, as a result, login to Comet and run your customer inquiry program. | Launching this script file starts Comet and replays the keystrokes from the c:\login.txt file. Thus, you could click on a web page hyperlink and, as a result, login to Comet and run your customer inquiry program. | ||
- | File Type Registration | + | '''File Type Registration''' |
In order to use a Comet Script File, you must run COSW.EXE at least once on the system where the CSW file will be executed. Running COSW registers the CSW file type with Windows as follows: | In order to use a Comet Script File, you must run COSW.EXE at least once on the system where the CSW file will be executed. Running COSW registers the CSW file type with Windows as follows: | ||
Registered file type: Comet Script for Windows | Registered file type: Comet Script for Windows | ||
- | |||
Extension: CSW | Extension: CSW | ||
- | |||
Content Type (MIME): application/x-comet-session | Content Type (MIME): application/x-comet-session | ||
- | |||
Opens with: path\COSW | Opens with: path\COSW | ||
Line 123: | Line 116: | ||
For more information and additional examples, please see the following web page: | For more information and additional examples, please see the following web page: | ||
- | |||
-------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ||
Copyright © 1995 - 2007 Signature Systems, Inc. | Copyright © 1995 - 2007 Signature Systems, Inc. |
Latest revision as of 10:10, 24 May 2009
Comet Script Files
Overview
Starting with Build 306 of Comet2002, you can launch Comet or CometAnywhere via a Comet Script File.
A Comet Script File is a one-line or two-line text file that contains startup information for Comet or CometAnywhere. These files are distinguished from other text files by a unique extension: CSW (an abbreviation for "Comet Script for Windows").
You can launch a Comet Script File from Windows Explorer, from a desktop shortcut, or from a web page hyperlink. This latter feature is where Comet Script Files really shine. Imagine clicking on a link on a web page and, as a result, launching a Comet or CometAnywhere session.
Launching Comet
To launch Comet via a Comet Script File, you'll need to create a two-line text file that contains the following commands:
WorkDir= Command=
The WorkDir= command identifies the working directory where the COSW.EXE program is located (also known as the "Start in" directory), and Command= specifies the command line option(s) for Comet. For example, the following commands identify c:\comet as the working directory, and specify the profile name (/pn), Comet Security Server auto-start (/sec), and maximize (/max) startup options:
WorkDir=c:\comet Command=/pn=node1 /sec /max
Save the Comet Script File with a .CSW extension. For the sake of this example, suppose we save the file using the following path:
C:\comet.csw
The Comet Script File is now ready to use. For example, to launch Comet from a hyperlink on a web page, include the following tags in your HTML file:
<a href="file:///c:\comet.csw">
Launch Comet
</a>
Thus, when you click on the "Launch Comet" hyperlink, the browser launches the c:\comet.csw script file, which starts Comet.
Launching CometAnywhere
To launch CometAnywhere via a Comet Script File, you'll need to create a one-line text file that contains the following command:
Command=
This specifies the command line option(s) for CometAnywhere. For example, the following command specifies the /net and /max options:
Command=/net:255.255.255.255 /max
Save the Comet Script File with a .CSW extension. For the sake of this example, suppose we save the file using the following path:
C:\cometanywhere.csw
The Comet Script File is now ready to use. For example, to launch CometAnywhere from a hyperlink on a web page, include the following tags in your HTML file:
<a href="file:///c:\cometanywhere.csw">
Launch CometAnywhere
</a>
Thus, when you click on the "Launch CometAnywhere" hyperlink, the browser launches the c:\cometanywhere.csw script file, which starts CometAnywhere.
Replaying Keystrokes
You can automate this process even further by using the /keyfile command line option. This option replays keystrokes from a text file when you start the COSW.EXE program.
For example, suppose you want to automate your Comet password entry and then run a customer inquiry program. You could create a text file that contains the keystrokes for these actions. In the following example, "PASSWORD" represents your Comet password, "CINQ" is the name of the customer inquiry program, and the two blank lines represent the Enter key being pressed after each action.
PASSWORD CINQ
Suppose we save this keystroke file using the following path:
C:\login.txt
You could then add the /keyfile command to your Comet Script File, as follows:
WorkDir=c:\comet Command=/pn=node1 /sec /max /keyfile=c:\login.txt
Launching this script file starts Comet and replays the keystrokes from the c:\login.txt file. Thus, you could click on a web page hyperlink and, as a result, login to Comet and run your customer inquiry program.
File Type Registration
In order to use a Comet Script File, you must run COSW.EXE at least once on the system where the CSW file will be executed. Running COSW registers the CSW file type with Windows as follows:
Registered file type: Comet Script for Windows Extension: CSW Content Type (MIME): application/x-comet-session Opens with: path\COSW
You can verify this by using Windows Explorer. Select the "View --> Folder Options" and "File Types," and then look for the "Comet Script for Windows" entry among the list of registered file types.
Starting with Build 306 of You can launch Comet or CometAnywhere via a Comet Script File.
A Comet Script File is a one-line or two-line text file that contains startup information for Comet or CometAnywhere. These files are distinguished from other text files by a unique extension: CSW (an abbreviation for "Comet Script for Windows").
You can launch a Comet Script File from Windows Explorer, from a desktop shortcut, or from a web page hyperlink. This latter feature is where Comet Script Files really shine. Imagine clicking on a link on a web page and, as a result, launching a Comet or CometAnywhere session.
For example, here is a Comet Script File that launches Comet using a profile name of node1, and including the /sec and /max startup options:
WorkDir=c:\comet
Command=/pn=node1 /sec /max
Saving this script file with a CSW extension lets you launch Comet via the script file. Here is a segment from an HTML document that demonstrates the point. These tags define a hyperlink that launches a Comet Script File named c:\comet.csw.
<a href="file:///c:\comet.csw">
Launch Comet
</a>
When you click on the "Launch Comet" hyperlink, the browser launches the c:\comet.csw script file, which starts Comet using the furnished information (profile name and other startup options).
For more information and additional examples, please see the following web page:
Copyright © 1995 - 2007 Signature Systems, Inc.