This repository has been archived by the owner on Dec 31, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Console.txt
222 lines (175 loc) · 8.9 KB
/
Console.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
Console Plugin version 1.0.3
Copyright (C) 2003-2004 Artur Dorochowicz
All rights reserved.
TABLE OF CONTENTS
--------------------------------------------------------------------------------
1. Overview
2. Licence
3. Installation
4. Services
5. Configuration file format
6. Plugin usage
7. History
8. Contacting the author
--------------------------------------------------------------------------------
1. OVERVIEW
--------------------------------------------------------------------------------
Console Plugin creates a console window where user can run other plugins'
services, see what they return, check and set variables and operate on flags.
It can be a very helpful tool during plugin development.
The plugin has been tested with PowerPro versions: 3.8 and higher.
2. LICENCE
--------------------------------------------------------------------------------
This is a freeware program. You may distribute it freely, but you must not
request or accept any amount of money or other payment for it.
This program is distributed in the hope that it will be useful, but without any
warranty. Without even the implied warranty of merchantability or fitness for a
particular purpose.
Console Plugin consists of the following files:
Console.dll - plugin's dll file
Console.txt - this readme file
Console.ini - example configuration file
Redistribution is fully allowed as long as all of the above files are included
and remain unchanged.
All used names are the property of their respective owners.
PowerPro and plugin template are Copyright (C) by Bruce Switzer.
3. INSTALLATION
--------------------------------------------------------------------------------
In order to use the plugin, you should place it in your PowerPro 'plugins'
directory. If you do not have 'plugins' directory, you probably have older
version of PowerPro. In this case place the plugin directly in your PowerPro
directory. After that you can use its services just like services from any other
plugin. Read PowerPro's help for general information on using plugins.
4. SERVICES
--------------------------------------------------------------------------------
show ("path_to_ini_file")
Creates a console window. Only one console window can exist at a time
and thus, when a console window is shown, consecutive calls to show()
service are ignored.
Argument "path_to_ini_file" specifies text file with settings for
the plugin. This argument can be omitted and then the plugin uses
its hardcoded defaults. See below for more information on
the configuration file.
close ()
Closes the console window. This operation deletes all information in the
console window, which means that next call to show() service will create
a completely new console window: empty, with no watches set, with no
information on previously used commands.
execute ("command")
Executes "command" on the console. Console window will be opened if it
is closed. All double quote characters in "command" must be preceded
by an escape character, e.g.
console.execute("win.handle('"PowerPro*'")")
print ("command")
Prints "command" on the console replacing current command line. Console
will be opened if it is closed. All double quote characters in
"command" must be preceded by an escape character,
e.g. console.print("win.handle('"PowerPro*'")")
append ("command")
Prints "command" on the console appending it to the end of the current
command line. Console window will be opened if it is closed. All double
quote characters in "command" must be preceded by an escape character,
e.g. console.append("win.handle('"PowerPro*'")")
Services that do not take any arguments, can also be used without brackets.
5. CONFIGURATION FILE FORMAT
--------------------------------------------------------------------------------
Configuration file let you customize the look of the console window. Its syntax
is similar to that of regular INI files. Every line starting with a semicolon is
treated as a comment. Section names must be put in square brackets.
In the current version the file can have these sections and settings:
FontSettings - section
Name - name of the font, it must be put in double quotes
Size - size of the font
Bold - 1 - bold font, 0 - normal font
Appearance - section
Prompt - string used as prompt, it must be put in double quotes
CopyrightNote - controls showing copyright note, 0 - do not show, 1 - show
Height - height of console window
Width - width of console window
Resizable - controls whether the window is resizable, 0 - not resizable, 1 - resizable
Left - initial vertical position of the window
Top - initial horizontal position of the window
For every setting which is not present in the configuration file, the plugin
uses its hardcoded default value. Hence there is no need to include every
setting in the ini file.
6. PLUGIN USAGE
--------------------------------------------------------------------------------
When the console is shown, the following commands can be used:
exit
Closes console window. Works like close() service.
set
Sets the value of the variable.
Syntax:
set variablename value
'value' argument can be omitted and then the variable is cleared.
Names of variables cannot be longer than 63 characters.
get
Returns the value of the variable.
Syntax:
get variablename
Names of variables cannot be longer than 63 characters.
'Get' cannot be used to check values of PowerPro keywords.
flag
Performs operations on flags.
Syntax:
flag set n1 n2
flag clear n1 n2
flag reverse n1 n2
This commands will set or clear or toggle flags of numbers from n1 to n2.
'n2' argument can be omitted.
watch1, ..., watch5
Sets watches at positions from 1 to 5.
Syntax:
watch1 variablename
This command sets watch 1 to 'variablename'.
Names of variables cannot be longer than 63 characters.
Watches for PowerPro keywords are not supported.
won
Turnes watches on.
Syntax:
won interval
'interval' argument specifies the interval in seconds between checking
variables on the watch list. If it is omitted then the deafult value
of 3 seconds is used.
Below the list of watches, there is a list of all PowerPro flags shown
with this format: flagnumber(state)
woff
Turnes watches off.
All other commands are send to PowerPro for evaluation.
Through evaluation you can do the following:
- run services from other plugins and get their return values:
plugin.service(arguments...)
- get values of PowerPro keywords:
e.g. pprofolder, pproversion, date, time and so on.
- get status of PowerPro flags:
pproflag(flag number)
- get values of regular PowerPro variables, it then works like 'get' command.
Up and down arrows can be used to cycle through the list of previous commands.
USING CONSOLE PLUGIN SERVICES FROM WITHIN A CONSOLE WINDOW IS NOT SUPPORTED.
Commands which would invoke Console Plugin services are not processed by the
plugin. However, you can still rename Console.dll to some other name and then
try to use this new one's services from within its console window. DO NOT DO
THIS! It may crash PowerPro!
7. HISTORY
--------------------------------------------------------------------------------
v. 1.0.3 (6 March 2004)
- 'show' service changed, it can now read settings from ini file
- console window is now customizable
- few minor bugs fixed
v. 1.0.2
- support for copy, cut and paste on the command line
- more power to command line editing - sorry that this was not in the first
release
- fixed errors which occured on Windows 98
- added 'execute', 'print' and 'append' services, see description above
v. 1.0.1
- fixed: when started from a menu, the console window did not get focus
- fixed: 'console.show' returned with error: "Error! RegisterClass() error."
when issued after closing console window other way than using 'exit'
command or 'console.unload' or clicking close button
v. 1.0.0
- first public release
8. CONTACTING THE AUTHOR
--------------------------------------------------------------------------------
All comments, feature requests, bug reports are welcome and greatly appreciated.
Mail to: Artur Dorochowicz <[email protected]> or use PowerPro group.