सीधे मुख्य सामग्री पर जाएं

The SMILE Utility

Create your own drop down menu for executing your favorite programs by simple text file.

Introduction-
In this section short description of smile components has been described.






About Smile -
SMILE stands for – Simple Menu – Interactive Liner Edition. It is a text Utility. It is a programmable, Menu based command chooser and executor. It converts each line of your text files in a menu system containing four main menus and six sub menus in each menu. The menu, sub-menu and action depend on the sequence of lines in the text file. In any text editor write these 84 lines -

In the first line write the name of your program.
Next line will be short description of it.
Next four lines will be the captions (names) of four menus.
Next 4*6=24 lines will be sub options of these menus in the order they have defined.
Next 4 lines will be status bar help of the 4 menus.
Next 24 lines should be the status bar help of the options.
Next 24 lines will be the command line actions or site url for these options.
Last 2 lines are your name and any auto action.

The action may be any dos command, batch file, Executable file, script file etc.

These 84 lines are the row data for your menu. There are scripts, template, and wizard available to create the row file. The extension of the row file will be ‘.tom’ (Text Of Menu)

Supporting Components of SMILE
SMILE have the following supporting components: -

1 Smile Menu Creator Wizard
HTML and VB Script Application
smilewiz.bat
It creates menu data file step wise
2 SMILE script
Visual Basic Script
smilevbs.bat
It is a Visual Basic Script which asks for data
and create a smile data file .tom (Texts of Menu)

3 SMILE form
MS Word Document
It is a Word document whose print out is used to plan the structure of menu.

4 SMILE Template
MS DOS Batch file
smiletmp.bat
It is a batch file of dos commands which used the Redirection feature of windows xp to create .tom
file.

5 SMILE Help
A SMILE utility
smilehelp.bat
It provides the online documentations of smile
6 SMILE Documents
HTML Document
smiledoc.bat
It is HTML documentation of the Smile program and its components. This manual.

7 SMILE shell
Dos batch file smileshell.bat It is a batch file which provides a programming environment. It provides a smile prompt.
8 SMILE Menu Editor wizard
HTML and VB Script Application
smewiz.bat
It edits your menu when you right click a .tom file in the window and choose edit.
9 SMILE Book
Excel Work-book
It is a excel document whose print out is used to plan the structure of menu.

10 SMILE HTML
Generate HTML Pages
It generates HTML pages containing Menu, Options and actions in a .tom file.





About Planning Form
It is a Word document whose print out is used to plan the structure of menu.
About Smile Documents
It is HTML documentation of the Smile program and its components.
About  Smile Script
It is a Visual Basic Script which asks for data and create a smile data file .tom (Texts of Menu)
About  Templet Generator
It is a batch file of dos commands which used the Redirection feature of windows to create .tom file.
About  Smile Wizard
It is an HTML and VB Script Wizard which crates the text file containing menu data (i.e. a .tom file) step by step.
About Smile Editor (sme)
It is an HTML and VB Script based wizard which edits the text file containing menu data (i.e. a .tom file) step by step. The options comes by right clicking in a .tom file or you can directly execute it with the .tom file as argument (i.e. sme abc.tom)
Modes of Smile
The Smile utility is available in two modes – CUI and GUI. CUI mode is simple executable but for GUI mode you need to install Perl because it runs on Perl
About Perl Tk GUI Version of SMILE
The Perl Tk GUI mode of SMILE has the following additional features: -
1. Use Mouse Click to open menus.
2. Perl Tk user can dynamically add options and sub-options.
3. Perl Tk user can Change the foreground and background text color.
4. Can be run in any Operating System supporting Perl.
5. Can be run under Linux.
6. Easy data file creation.
7. and many more ........!
File - smile.pl available in Windows folder.
About DOS Version of SMILE
It is a Command line utility for Windows
The features of CUI version are :-
1. You need not to use arrow keys to move the highlighted. Just press any key to move the highlighted.
2. Four programmable menu with one default system menu.
3. Six options in each menu. i.e. 4*6=24 options programmable.
4. Change in the source data while running.
5. Need not to add quit option. it is by default available in the system menu - smile.
6. Shutdown by smile utility itself.
About Texts of Menu (.TOM)
‘.tom’ is the extension of the data file of smile. It is a simple text file in ASCII. The .tom file contains 84 lines of data. One line contains only one data. Smile .exe reads this file and crates a menu according to data in the file. The data in the file is arranged in a predefined sequence. See tutorial and overview for more. Tom is our smile boy. He always smiles.
An Overview of SMILE
This utility is build for you to create menus of your choice in a simple way. This utility was build on dos environment using C++. It is a programming environment. Similarly the SMILE program is also like a programming language with syntax of no keywords.
Version:-
You are using version 4.6 of Smile. It means you can program 4 menus with 6 sub menus each i.e. 4*6=24 options programmable. The program have a default menu with system options also. Including this there is 5 menus so you can say it SMILE-5 also.
Programming:-
        The programming is very easy. You have to know only the syntax which is only the sequence of options. This program works on a text file and convert the text file into a menu system like this you are using. It checks the file and compile it if no errors or return the error. The error is only a missing line or long data.
Creation:-
In the row file you have to write only a list of data one line each. The program convert the lines into menus as it is defined. only you have to keep the sequence otherwise the menu generated will be different from your choice.
In any text editor write these 84 lines -
In the first line write the name of your program.
Next line will be short description of it.
Next four lines will be the captions (names) of four menus.
Next 4*6=24 lines will be sub options of these menus in the order they have defined.
Next 4 lines will be status bar help of the 4 menus.
Next 24 lines should be the status bar help of the options.
next 24 lines will be the command line actions of the options.
last 2 lines are your name and any auto action.
The action may be any dos command, batch file, Executable file, script file etc.
        These 84 lines are the row data for your menu. There are scripts, template, and wizard available to create the row file. The extension of the row file will be .tom (Text Of Menu)
Running :-
To run it double click on the file or enter this on the command prompt-
   smile <file name>
The menu will be compiled and run. See picture 1 which is screenshot of dos mode.

For more see the tutorial.
Running GUI Mode:-
GUI mode has been created using Perl Tk, so Perl Tk should be installed in your system.
To run in GUI Mode right click on a .tom file and choose "Run Perl Tk GUI Mode"
(CUI mode is the default mode).
To run from the command prompt or from batch file or enter this on the command prompt or in batch file-

perlsmile <file name>
The menu will be compiled and run. See picture 2 which is screenshot of Perl TK GUI mode of smile.
Creating HTML Menu:-
You can convert your menu file (i.e. a .tom file) into a set of HTML pages. Just right click on a .tom file and click on "Generate HTML pages" option. it will not only create seven html files in "SMILE" folder in current directory but also opens the main file and an intro-duction. You can later use these files in your web project.
Note that use only site url in action filed and not the command.
To run from the command prompt or from batch file or enter this on the command prompt or in batch file-
Smilehtml <file name>
It will create html pages for your menu and run like picture 3 which is screen shot of SMILE menu in HTML mode. This is new style based on CSS3 but there is an old style also which is plan HTML pages.

Smile Shell:-
uses:
 smileshell
or
ss color prompt
eg. ss 0a shilpi
----------------
Installation Guide
        This utility comes with a self-installer wizard setup. Just execute its setup and it will be installed. Although you can use this utility without installing it from command prompt or batch file.
From Batch File :-
       Where you have created your menu data file (.tom) there you have to create a batch file containing only one line-
                        SMILE <FILE NAME>
Now you can paste shortcut of this batch file anywhere and run.
Note:- Please don’t keep Spaces in file name
Creating File Association:-
   After unzipping/installing you have to do the following things: -
1. Create a line in the autoexe.bat file                        %Path%=<the path where you have unzipped/installed>
Note: you can open autoexec.bat in your system editor just click start>run and type "msconfig" and click OK.
2. Now you have to make file association. Follow the following steps to make file association.
a. Open My computer
b. Choose "Folder option" from "Tools" menu.
c. Click on the "File Types" tab.
d. Click on the "New" Button.
e. Enter .tom in the Extension field and click OK.
f. Now select the .tom from extension from the list and click "advanced" option.
g. Click on the "New" button and enter "Run" in the Action field.
h. Enter the path of smile.exe file in the "program
i. to perform this action" field. You can use browse to search. then click ok
j. Similarly click again on the "new" button and create
k. "Edit" option and associate it with any text editor.
l. Now select the Run action and click on the "Set Default" button.
m. Enter a "Texts of menu" in the description field.
n. Change the icon if you want.
o. Finally click on OK.

3. After creating file association you can run your menu by double clicking on the file. Create a .tom file and Test it.
4. Right click on the .tom file and chose edit to see whether it opens in your smile editor or not.

That done...!
        Enjoy!
Tutorial
This tutorial will teach you the way how to create your menu. You can manually write texts of menu but I suggest you to use the smilewiz.htm wizard.
Using Wizard :-
   follow the following steps to create your menus.
1. Print a copy of smileform.doc in super economy mode. It is a simple form called the Smile Menu Planning form.
2. Fill the form with pencil and erase if necessary.
3. Now run the <smilewiz> from command prompt.
4. Fill all the data you want.
5. Run the .tom file by double clicking on it or entering 'smile <filename>' on command prompt.
Running GUI Mode:-
GUI mode has been created using Perl Tk, so Perl Tk should be installed in your system.
To run in GUI Mode right click on a .tom file and choose "Run Perl Tk GUI Mode" (CUI mode is the default mode).
To run from the command prompt or from batch file or enter this on the command prompt or in batch file-
perlsmile <file name>
The menu will be compiled and run.
        You can then edit your texts of menu by choosing "source" from
the Smile menu. It will open the source file in notepad, Windows text editor.
If you have changed any data, you have to reload the all data for get with it. for this choose "Refresh" from the Smile menu. It will regenerate the menu. You need not to add any exit option, as you can exit from "quit" option of the Smile menu.
Using Script :-
        Follow the steps 1,2,4,5 instead of 3, at step 3 use <smilevbs> to run the data asking script.
Using Templet :-
        follow the following steps to crate menu from template.

1. Run <smiletmp> from the command prompt.
2. When the menu will be created you have to edit it.
3. For this use "source" option from the Smile menu and edit the data you want. You can also edit it using smile editor. For this right click on it and choose edit.
4. After editing choose "Refresh" from the Smile menu to regenerate the menu.
5. Finely rename the unnamed.tom file according to your need.
Smile Shell:-
uses:
smileshell
or
ss color prompt
e.g. ss 0a shilpi
Installation:-
        Run the setup and follow the instructions. For manual installation see installation guide for more.
Editing Smile Menu
The utility comes with a built-in editor. The editor is built of HTML and VB Script. To edit a SMILE Menu just right click in a ‘.tom’ file and choose ‘Edit’ option like in picture 4.
After selecting edit option it will open the editor with all lines of the ‘.tom’ file already filled in text boxes. You can easily edit it and save it. For edit a SMILE menu from command prompt just enter the following at command prompt –
sme <file name>
for example if you want to edit ‘dosman.tom’ file just type “sme dosman.tom” at the command prompt. It will open the editor whose screenshot is given at picture 5.

Bugs and how to overcome

        In every program the programmer wants to debug it. I also tried to debug the program but there is still a bug in this program.

The Bug :-
        You can run your menu from any where by double clicking on the .tom file. But some times, mainly when you run the program form My computer or desktop, the program crashes and this is the bug.

Overcome :-
        To overcome this problem use batch file to run your menu.

RUN From Batch File :-
=======================

        Where you have created your menu data file (.tom) there you have to create a batch file containing only one line-

                        SMILE <FILE NAME>

Now you can paste shortcut of this batch file anywhere and run.

Note: - Please don't keep Spaces in file name. If you keep use wild card (‘*’ for any number of characters and ‘?’ for one character) to run. i.e. SMILE <filename*>

Frequently Asked Questions
Here are some commonly asked questions about the SMILE utility and their answers.
General FAQs
Question (1): - What this utility does?

Answer: - Nothing. It just converts your text file into menus (4 menus 6 Sub menus i.e. 24 Options. The text file contains 84 lines of data. See overview and tutorial for more information.

Question (2): - How it works?

Answer: - Simply. It reads your data file and converts it into menus. A line in the data file is a menu, sub menu, status bar help or action.

Question (3): - How to create the data file?

Answer: - Using wizard. You can use "smilewiz" to create the .tom (Texts Of Menu) file. The wizard will guide you step by step.

FAQs For Dummies

Question (1): - Why I use SMILE?

Answer: - If you want a program that allows you to choose your favorite program from a menu and you want to categorized those options you should use SMILE.

Question (2): - How it can be?

Answer: - Simply. Just for example if you want to run winamp under the music menu, you can do it by making menus. Create a menu using wizard and run it. See tutorial for more.

Question (3): - How to create the menu file?

Answer: - Using wizard. You can use "smilewiz" to create the ‘.tom’ (Texts Of Menu) file. The wizard will guide you step by step.

Question (4): - I am waiting for time change but it doesn’t?

Answer: - Just press any key and it will refresh.

FAQs On Menu Creation

Question (1): - Is there any wizard to create menu?

Answer: - Why not. Run "smilewiz" on the command prompt and you will have a wizard in HTML page format. It will guide you step by step and create your menu.

Question (2): - Is there any another way to create menu?

Answer: - Yes. You can use "smiletmp" to generate a slandered menu and modify them later. Also you can use "smilevbs" to create menu in an ask and put manner. If you have understand the sequence you can manually create menu using any text editor.

Question (3): - What is the sequence if I create manually?

Answer: - The .tom file is a text file of 84 lines. The sequence is as follows :-
Line 1     :       Title
Line 2     :       Description
Line 3-6   :       Caption of 4 menus
Line 7-12  :       Options of first menu
Line 13-18 :       Options of 2nd menu
Line 19-24 :       Options of 3rd menu
Line 25-30 :       Options of 4th menu
Line 31-34 :       Helps of 4 menus
Line 35-58 :       Helps of 24 sub-menus respectively
Line 59-82 :       Actions of 24 options respectively
Line 83    :       Name of the creator
Line 84    :       Any command to run at start up for example a color change. Below these 84 line you can add any thing as comment.

Question (4): - Can I modify a premade menu with wizard?

Answer: - Why not. Run "smilewiz" on the command prompt or right click and choose edit and you will have a wizard in HTML page format. It will guide you step by step and create your menu. Click On the browse button and select the file. Then click on Modify this button and you will see that all the field have been filled with the data of the file. Modify what you want and click on the submit button.

FAQs on Working           

Question (1): - How to run a menu created?

Answer: - It is so simple. Just enter "SMILE <FILENAME>" at the command prompt. If you have crated a file association you can simply double click on the file to run. (See Installation guide for information on how to create file association.)


Question (2): - How to quit from this program?

Answer: - Simply. Chose QUIT from the SMILE menu. For this press any key to move the highlighted until it is on SMILE menu. Then Press <ENTER>. Again, press any key to move the highlighted until it is on quit. press enter. press enter again.

Question (3): - Can I shut down the system from SMILE?

Answer: - Yes. The option is available in SMILE menu.

Question (4): - Can I Stop an action or command while running?

Answer: - Yes. Press CTRL+C for cancel a dos command or batch file. But if you are using a program you have to use the cancel option of that program.

Some COOL questions
Here are some commonly asked questions about the SMILE utility and their answers.

Question 1: - I have created menu using wizard and now I want to change it?

Answer: -` COOL! It is not a hard job. Just use source option of the SMILE menu and you will find notepad ready to edit.

Question 2: - When I double click my .tom file, It not runs. why?

Answer :- COOL! It is not your fault. Actually, this is a bug that sometimes double click don't works. This is perhaps Windows don't allow long file name to a dos program. So, use batch file to run your program. See the bug section for more.

Question 3: - What to do if I want to use only few options?

Answer: - COOL! Use the wizard "Smilewiz" to create your menu. Just fill up the field you want to use and leave the default the others.

Some HOT Questions

Here are some commonly asked HOT questions about the SMILE utility and their answers.

Question 1: - How dare you to use notepad in your program?

Answer :- Because it is the default text editor of windows and it is free with windows. Generally, any browser uses notepad for view>source option.

Question 2: - What if your program crashes my system?

Answer :- It is never possible. My program is not a virus. Although I suggest you to check it with your latest antivirus. Your menu can crash your system if you use any unauthorized actions in the action field of options. This is all your risk and not me. For example, if you use "Format C:" in the command line action the program will format your hard disk and it is your fault.

Tips and Tricks
Now presenting some Tips on using the SMILE utility and its supporting components.



TIPS and TRICKS on Wizard
       Here are some Tips and Tricks on the using of wizard for menu creation and I think you will enjoy this.

                    |||||||||---------||||||||||
                    ||        T I P S         ||
                    |||||||||---------||||||||||

TIP 1 :-
=========
        If you want to save the file on another, i.e. overwrite, click on the browse button.

TIP 2 :-
=========
        You can use copy and paste function to fill the fields.

TIP 3 :-
=========

        Plan the menus before filling up the Fields on a paper. You can use Smile planning form also.




TIP 4 :-
=========
        Please fill site URL only in action filed if you are planning to convert your menu into html pages.

                    |||||||||-------------||||||||||
                    ||        T R I C K S         ||
                    |||||||||-------------||||||||||

TRICK 1 :-
==========

        If you want to save your file in a folder under several folders and you don’t want to type the path then click on the Browse button and go to the folder you want. Choose any file and click open. The path with file name will be written in the text box. Just delete the file name        and type your own.


TRICK 2 :-
==========
        If you use same texts again and again in the text boxes I suggests you to use auto fill feature of the Internet Explorer. For this Click on Tools and chose Internet Options. Then click on the content tab and click on auto complete button. check forms and click OK. Click OK to close the dialog box.
TIPS and TRICKS on Template

Here are some Tips and Tricks on the using of Template for menu creation
and I think you will enjoy this.

                    |||||||||---------||||||||||
                    ||        T I P S         ||
                    |||||||||---------||||||||||


TIP 1 :-
=========
        The ‘smiletmp’ creates menu by writing to the file using the redirection features of windows XP command Interpreter cmd.exe and thus this can-not used in windows 98/95.

TIP 2 :-
=========
        Press F2 to rename the unnamed.tom file.


                    |||||||||=============||||||||||
                    ||        T R I C K S         ||
                    |||||||||=============||||||||||


TRICK 1 :-
==========
        The ‘smiletmp’ is a batch file and you can modify it. You can use it as your default menu creator.

 TRICK 2 :-
==========
        The default file name of the menu created using ‘smiletmp’ is ‘unnamed.tom’ which you have to rename. To use file name interactively open the smiletmp.bat file in notepad and change all ‘unnamed.tom’ to %1 (use find and replace for this purpose). Then you have to pass the        file name as an argument of ‘smiletmp’. i.e. smiletmp <file name>


TIPS and TRICKS on Script
Here are some Tips and Tricks on the using of Script for menu creation and I think you will enjoy this.

                    |||||||||---------||||||||||
                    ||        T I P S         ||
                    |||||||||---------||||||||||

TIP 1 :-
=========
        You can use copy and paste feature for entering data into the asking prompt of visual basic script.



TIP 2 :-
=========
        If you don't want to use a menu just leave the default.

TIP 3 :-
=========
        Plan the menus before filling up the Fields on a paper. You can use Smile planning form also.





                    |||||||||-------------||||||||||
                    ||        T R I C K S         ||
                    |||||||||-------------||||||||||

TRICK 1 :-
==========
        If you want to save your file in a folder under several folders and you don’t want to type the path then open My computer from desktop and go to the folder you want. Right click on the address bar and chose copy. The path will be copied into the clipboard. Now just paste it in the asking prompt by pressing CTRL+V and type the file name.

TRICK 2 :-
==========
        You can change the default values also. Right click on the smilevbs.vbs file and choose edit. The script will be open in note pad. Now you can change the default values. Just find the default text and change them. Remember don't disturb the syntax.

TIPS and TRICKS on Planning Form                     
Here are some Tips and Tricks on the use of Planning form for menu creation and I think you will enjoy this.

                    |||||||||---------||||||||||
                    ||        T I P S         ||
                    |||||||||---------||||||||||

TIP 1 :-
=========
        Print the form by opening in word.


TIP 2 :-
=========
        Print in super Economy Mode.


TIP 3 :-
=========
        Fill up the form by pencil and use a soft eraser to erase.


                    |||||||||-------------||||||||||
                    ||        T R I C K S         ||
                    |||||||||-------------||||||||||


TRICK 1 :-
==========
        If you don't want to take printout again and again then take only one printout and keep this. Keep some photocopies of this and use it.

TRICK 2 :-
==========
        If you want to keep a documentation also then fill the form on the computer itself using any word processor. Take its printout for documentation.



TIPS and TRICKS on Installation
Here are some Tips and Tricks on the Manual installation of SMILE and I think you will enjoy this.
                    |||||||||---------||||||||||
                    ||        T I P S         ||
                    |||||||||---------||||||||||
TIP 1 :-
=========
        You can make file association from command prompt also. Try "assoc/?" on the command prompt for more.
TIP 2 :-
=========
        You can make more then one association for an extension to edit the  .tom file. Repeat the process e, f and g of the installation guide.

                    |||||||||-------------||||||||||
                    ||        T R I C K S         ||
                    |||||||||-------------||||||||||

TRICK 1 :-
==========
        If you don't want to make a file association due to its long process, here is a short method for you. Just double click on a .tom file and windows will ask you to choose a program from the list. Click on browse and select the smile.exe program. Check the check box "Always use the same program to open such file" and click OK.
                That’s all done.
TIPS and TRICKS on Using SMILE
       Here are some Tips and Tricks on the using of SMILE menu program and I think you will enjoy this.

                    |||||||||---------||||||||||
                    ||        T I P S         ||
                    |||||||||---------||||||||||

TIP 1 :-
=========
        If you want to try an action you need not to open command prompt. It is available under the SMILE Menu.


TIP 2 :-
=========
        If you want to edit the source file while running choose source option from the smile menu.

TIP 3 :-
=========
        Use Find and replace option of notepad under edit menu or CTRL+F to edit repeated data.

TIP 4 :-
=========
        Rename the .tom file to .tomx file and double click on the file to run. It will ask you to choose a file to open tomx file. Choose perlsmile.bat under windows folder. It will create a new file association.

                    |||||||||-------------||||||||||
                    ||        T R I C K S         ||
                    |||||||||-------------||||||||||

TRICK 1 :-
==========
        If you have changed the data source the effect will not take just. but you don’t have to restart the program again. Just choose the refresh option from the smile menu.


TRICK 2 :-
==========
        You can use shutdown from the smile menu to quickly shutdown. But this will work in above windows xp only.


टिप्पणियाँ