Visual DialogScript has an integrated editor, debugger, compiler message window and project manager, as shown below.
The environment has three main sections.
-
The toolbar/menu bar contains the menu items and toolbar buttons which you use to load, edit, save and test your scripts. Besides the usual file open/save, cut/copy/paste and find/replace options there are a set of VCR-like buttons to execute scripts, halt and resume them, and step through one line at a time.
Â
-
The editor window is where you enter and edit your scripts. When you are debugging a problem script you can see the line being executed highlighted. A right-click context menu provides instant access to context sensitive help, and lets you set and remove breakpoints at the cursor location. It also allows for more than one file to be opened.
The extra tools section offers a debug window. You use it if you have a more difficult troubleshooting problem. It shows the value of all the script variables at the time the script stopped running. When used in conjunction with the single step debugger function it enables you to see exactly what your script is doing. Compiler messages allow you to see if there are any errors while trying to compile your script. The project manager allows you set your include, resources, version information and where to put the resulting exe file and what icon to use.
Tools
   Additional tools are available to help you develop more complex scripts. The Window Spy is used to obtain the names of other application windows which you need in order to control them from your script. The standard version of Visual DialogScript can create executable files and includes an icon editor so that your executables can each have their own custom icon.
    New Tools are easily added to Visual DialogScript's Tool many, by placing them in the tools directory. Additional tools are often found on the Web site.
LanguageÂ
    The DialogScript language borrows from both MS-DOS batch language and spreadsheet macro languages to provide a set of programming commands that are both powerful and easy to learn. There is no need to master complex programming ideas like block structure, scope, or typed variables, nor is there any need to know anything about the Windows API.
ExampleÂ
    Here is an example of what can be done using Visual DialogScript. The dialog shown below is a Windows 'touch' utility which sets the date and time stamps of a set of files to a value you specify. The program uses drag and drop, so you simply drag the files you want to touch to the list box, enter the date and time, and press Touch.
Now let's look at the code for this program:
Â
TITLE WinTouch |
Â
    First of all, it's worth pointing out that if you use the Dialog Wizard to generate the program after designing the dialog using the Dialog Editor, you actually need to write only ten lines of code out of the 29 total of this program.
Â
    The title command simply sets the title for the application.
Â
    The dialog create command defines the dialog itself, and is created using the Dialog Editor. The only modification is to insert the two @datetime function calls in the two EDIT dialog elements, which sets the two edit fields to the initial date and time. The parameters of the DLGTYPE element say that we want the program to respond to drag-and-drop operations, and we want the dialog to remember the position we last placed it at on the screen.
Â
    The dialog disable command disables the Touch button, so that it can't be pressed if there are no files in the list.
Â
    The lines :again and :evloop are labels. The two lines after :evloop wait for something to happen (called an event) and then go to a label with a name corresponding to the type of the event. There are three possible types of event: TouchBUTTON, which occurs when the Touch button is pressed; DRAGDROP, which occurs when a drag and drop operation takes place; and CLOSE, which occurs when the user closes the dialog. Note that DialogScript is not case sensitive about its treatment of labels, or indeed practically anything. All the labels and skeleton event handling code is generated by the Dialog Wizard, if you use it, so your own contribution to the program is just to insert some code after the event labels to define what the program is supposed to do.
Â
    Dealing with the DRAGDROP event is simply taken care of with the command list FileList, DROPFILES, which adds the names of the files dragged and dropped to the list box. If we had not bothered with the refinement of making the Touch button context sensitive the following line, which enables it, would not be necessary. The program then returns to the label :evloop to await the next event.
Â
    The six lines following the label :TouchBUTTON effectively remove the filenames from the list box, one at a time, and use the file setdate command to change the date and time to that specified in the two edit fields. Once all have been processed, the program loops back to :again to disable the button and await the next event.
Â
    The default action for the CLOSE event is to exit the program. This part of the code is generated by the Dialog Wizard.
Â
Running ScriptsÂ
    The Personal versions of Visual DialogScript are designed for writing scripts which will be run on the same PC. Using Windows' built in file association mechanism, when you double-click on a script's icon the script is run. A tool is provided which allows you to create Program Manager or Start Menu icons for the scripts you create.
    The Standard and Professional versions can create executable files which can be distributed with a run time engine so that they can be run on PCs that don't have a licensed copy of Visual DialogScript installed. No royalty payments are needed to distribute the run time. This makes Visual DialogScript the most cost effective tool where script programs have to be distributed across an organisation. Most Windows batch languages have to be licensed on a per-system basis.
Â
The End
    Thank you for taking this quick tour of Visual DialogScript. We hope you will agree that it is more than just a Windows batch language. Please download an evaluation copy and try it out for yourself. If you have any other questions about the functionality of Visual DialogScript read the FAQ or visit the Support page.
Â
Unlike other programming languages, the syntax of DialogScript is very simple. Each command occupies one line, and has a plain English name that clearly describes its purpose. Variables are typeless, and can hold many kinds of information, for example, numbers or text. Functions are clearly distinguishable with names that start with '@', just like a spreadsheet.
The DialogScript language has a simple syntax not unlike MS-DOS batch language. It is designed for ease of use and efficiency when being interpreted by the run-time engine. There are 10 system variables, %0 to %9, which initially have the script file name in %0 and command line parameters in %1 through %9, just as in a batch file. There are also a further 26 user variables, %A to %Z. The contents of all variables (including system ones) can be changed once the script is running. There are now also 4032 global variables. These variables begin with %%, a letter, then alphanumerics plus underscores (e.g. %%my_variable_1.) There is no limit on the length of these user-defined variable names.
Read more...Â
    If you want a dialog box interface for your script then you can use the dialog editor to design it interactively, dragging and resizing components with the mouse, and seeing the results as you go along. The dialog editor generates DialogScript commands which are pasted into the script code.
Â
    The dialog editor has three windows: the editor window, the elements bar and the dialog being created.
    In the editor window (1) you can see the element title, and its position and size, followed by a list of all its properties that define how the element should look and react on your dialog box. Other elements can be viewed by using the drop down box at the top, then selecting which element you need to view, or modify.
Â
    On the elements bar (2), all the available elements that you can use on your dialog box are at your beckoning. Just move your mouse over to the element you desire, click on that element, then move your mouse over to the dialog box that you are creating, and click where you would like that element to be placed.
Â
    In the dialog window (3) the selected element is shown by the presence of sizing handles. Dialog elements can be placed and sized either by dragging on these using the mouse, or by typing values and text into fields in the editor window.
Â
    The dialog editor is a two way tool. From the code editor window you can place the cursor in the first line of a dialog definition and the dialog will be loaded into the editor, ready for editing. When you are finished, the amended dialog definition is automatically inserted back into the script code.
New Version Currently Available!
Download V-Setup 4 shareware version Now!
V-Setup is an extremely easy to use tool for developers to quickly build and deploy installers and setup builds to distribute their software.
With a what-you-see-is-what-you-get (WYSIWYG) interface building an installer is as easy as clicking a few buttons and entering some text to get your installer ready to distribute.
Full support for Windows Vista UAC and administrative required modes, support for multi-disc installs and direct support for burning directly to disc media are some of the new features within V-Setup.
There is no need to learn complicated scripting and fiddling with plug-in modules, everything you need to build a fully functional installer for all versions of Windows is within your grasp with V-Setup.
V-Setup can write directly to the Windows Registry, copy files to any portion of a Windows system, modify existing files on disc, overwrite files based on version checking, registering ocx and dllâs, creating shortcuts and internet shortcuts, running executables after installation completion and before software uninstalls, fully customizable dialog screens and text, and built in support for multi-lingual installations.
When you need to quickly build and deploy a robust installer for your software, V-Setup is your best option.