vdsconsole.dll extension
Console IO Extension for Visual DialogScript
Version: 1.7.30.2000
Copyright © 2000 PGWARE
All rights reserved
Description:
This is an extension that provides Visual DialogScript the ability to provide communication between a console application and their script. The extension allows the programmer to send strings of text to the console application while its running and retrieve text from the console window while its running. The console window will be run in hidden mode automatically and allows for logging of the entire session. Shell piping of the console application is done in realtime. This extension is freeware for personal/freeware usage only. If you would like to use this extension in shareware or commercial application's or any application that generates any kind of revenue please read the bottom of this documentation. Also please read the important information at the bottom of this documentation which explains things you should know about this extension and how to property terminate shell piping.
Commands:
[+] CONSOLEIO CLOSE
[+] CONSOLEIO OPEN
[+] CONSOLEIO PRIORITY,<priority level>
[+] CONSOLEIO PROMPT,<prompt>
[+] CONSOLEIO RESET
[+] CONSOLEIO START,<filename>,<params>,<log file>
[+] CONSOLEIO STOP
[+] CONSOLEIO TIMEOUT,<value>,<kill>
[+] CONSOLEIO WRITE,<text>
[+] CONSOLEIO WRITELINE,<text>
[ Command Explanation ] :
[-] CONSOLEIO CLOSE
This command will close the interface between your application and the console application. This should be used before you exit your script. You should first make sure to close the console application before you terminate the shell piping with this command, or an error will occur.
[-] CONSOLEIO OPEN
This command opens the interface and prepares it for the use between your application and those console application. You should use this command before any other CONSOLEIO command/function.
[-] CONSOLEIO PRIORITY,<priority level>
This command sets the priority level of the console application. Setting the priority level determines the speed and accuracy of the redirection of input and output between your application and the console application. If you use this command you must use it before using the CONSOLEIO START command.
<priority level> - you must use one of the following values for a priority level:
HIGHER
HIGHEST
IDLE
LOWER
LOWEST
NORMAL
TIMECRITICAL
[-] CONSOLEIO PROMPT,<prompt>
This command allows you to change the prompt character that the console application uses. This is used for when a prompt occurs in a console application. The prompt character notifies your application that input is needed. Most console applications use the prompt '>'. You should change this value to what your application uses as the prompt character. The default is an empty character. If you use this command it must be used before the CONSOLEIO START command.
<prompt> - this must be a character that represents the prompt character in your console application. Dos uses '>' as the prompt character. By default there is no prompt character set.
[-] CONSOLEIO RESET
This command resets all values you have set with the CONSOLEIO PROMPT, PRIORITY, TIMEOUT paramaters. You should only use this command if you need to start a new console application with new paramaters for those values. Also notice that you should terminate redirection with the previous console application before you reset the CONSOLEIO.
[-] CONSOLEIO START,<filename>,<params>,<log file>
This command allows you to start a console application and supply commandline paramaters to it. You can also optionally save a log file of the entire communication session. Communication between your application and the console application will start after you issue this command and events will be generated on each line read or termination of communication.
<filename> - this must be a fully qualified filepath and filename to a console application you want to communicate with.
<params> - this is an optional paramater. You should only use this if the application needs commandline paramaters issued with it .
<log file> - this is an optional paramater. This paramater allows you to save the entire communication session between your application and the console application to a file. The file cannot be accessed till all communication between the two applications has terminated.
[-] CONSOLEIO STOP
This command allows stops all communication between your application and the console application. No communication between the two applications can occur after this unless you reopen the console application and start it.
[-] CONSOLEIO TIMEOUT,<value>,<kill>
This command allows you to set a timeout value for the console application. This causes a timeout event to occur if nothing is read or sent within the time specified here. This command also allow you to determine if the application will be terminated when a timeout occurs or not. Note that some console applications have internal timeout timers which are not affected by this command.
<value> - this is a value in seconds that determines when an application should timeout.
<kill> - this paramater must either be a 0 or 1 value.
0 - application does not terminate however timeouts may keep occuring. This is the default value if this param is left null.
1 - causes the application to terminate when a timeout occurs.
[-] CONSOLEIO WRITE,<text>
This command allows you to write text to the console application. This is only practical when a ONPROMPT event occurs. As this is when the console application expects text to be entered to the console window. This command will only send the text and does not send a corresponding ENTER character.
<text> - this is text that you want to input to the console application.
[-] CONSOLEIO WRITELINE,<text>
This command allows you to write text to the console application. This is only practical when a ONPROMPT event occurs. As this is when the console application expects text to be entered to the console window. This command will send the ENTER character after the lines of text. Most console applications will use this method or writing.
<text> - this is text that you want to input to the console application.
Functions:
[+] @CONSOLEIO(READ)
[+] @CONSOLEIO(STATUS)
[ Function Explanation ] :
[-] @CONSOLEIO(READ)
This function should only be used after the events ONLINE or ONPROMPT occurs or it will just return an empty string. The string is cleared after the function is called. The function will return text from the console application on each line of text from the console window or when a prompt occurs.
[-] @CONSOLEIO(STATUS)
This function should only be used after the event ONSTATUS occurs or it will just return an empty string. The string is cleared after the function is called. The function will return the status from the console application.
Events:
[+] ONDONE
[+] ONLINE
[+] ONPROMPT
[+] ONSTATUS
[+] ONTIMEOUT
[ Event Explanation ] :
[-] ONDONE
This event occurs when the console application has finished and has terminated.
[-] ONLINE
This event occurs when a new line of text is encountered in the console application. The event will allow you to read the line of text by using the @CONSOLEIO(READ) function.
[-] ONPROMPT
This event occurs when a prompt occurs in the console application. The event will allow you to read the prompt message by using the @CONSOLEIO(READ) function. Some applications use the prompt character '>' so you should set the prompt using the CONSOLEIO PROMPT command.
[-] ONSTATUS
This event occurs when the console application's status changes. The event will allow you to read the status message by using the @CONSOLEIO(STATUS) function.
[-] ONTIMEOUT
This event occurs when a console appliation has timed out.
Important:
It is important to remember that the console application must be closed before terminating the link between it and your application. Some applications such as COMMAND.COM , CMD.EXE won't exit until you type EXIT. You should check the documentation on the application on how to close on exit. If you do not an exception error will occur and the winoldap will continue to stay open. For command.com; cmd.exe just type a CONSOLEIO WRITELINE,exit so it terminates the console window.
Support:
Please note that this extension is freeware and support is not provided. However bug fixes will be made as they are found but are not top priority. Also if you would like to use this extension in shareware , commercial application's or any application that generates revenue then please contact me for pricing details. Report bugs & enquire about pricing at [ support@vdsworld.com ].
Copyright © 2000 PGWARE / All rights reserved.