home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: WPS_PM
/
WPS_PM.zip
/
autos2.zip
/
autos2.INF
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1997-11-05
|
41KB
|
1,481 lines
ΓòÉΓòÉΓòÉ 1. Product Information ΓòÉΓòÉΓòÉ
AUTOS2 is available on a 30 day demonstration basis at which point the program
will expire. If you are satisfied by the product's performance and usefulness,
you may become a registered user by completing the Registration form.
This form can then be forwarded as per the instructions therein and
subsequently receive product enhancements and any required support.
Squiredeck can not be responsible for any data loss or system damage during the
usage of AUTOS2. However by correctly following the Usage Guidelines you should
receive benefits in productivity while running repetative programmable tasks.
ΓòÉΓòÉΓòÉ 1.1. Who should use AUTOS2 ΓòÉΓòÉΓòÉ
AUTOS2 can be used by any person with a reasonable knowledge of the OS2
operating system.
This product should be seen as an productivity enhancer to the operating of the
PM Desktop rather than as an application.
Most likely the automation tasks will be set up by the desktop or network
supervisor during product installation.
ΓòÉΓòÉΓòÉ 1.2. Product Overview ΓòÉΓòÉΓòÉ
AUTOS2 has been written to perform automation on the OS2 PM Desktop.
This automation can only be performed on PM framed window objects and sub
classes.
Once a framed window has been identified (or not) AUTOS2 can be used to
navigate to a sub class (i.e. an EntryField) and perform actions on it, such as
issue keystrokes. Further these activities can be Scheduled to occur at a
preset Date/Time/Interval to enable hands off automation.
This means a task or set of tasks may be performed overnight ready for the next
days production activities. Further a monitoring task can be set up to check
the existence of a PM window and then take appropriate action.
These tasks could be the nightly backup or data download. There are two main
entities within which to store these required tasks.
Schedules
A Schedule consists of a set of commands that are to be executed on a
pre-determined Date or within a Date range, also the Time of execution may be
preset.
The same task may be set to execute at regular intervals for the preset
Date/Time.
To facilitate non productive periods then non automation dates may be selected,
as can particular months.
Schedules can run Scripts to enable re-use of fully tested scripts in a
scheduled manner.
Scripts
Each script will normally contain the actions required to conduct a dialogue
with a particular window.
They can be used to divide up lengthy complex dialogues to allow for easier
testing.
A Script can be embedded within a Script to facilitate nesting should it be
required.
ΓòÉΓòÉΓòÉ 2. Main Window ΓòÉΓòÉΓòÉ
This window is the window that first appears when AUTOS2 is invoked.
Continued
ΓòÉΓòÉΓòÉ 2.1. Main Menu Items ΓòÉΓòÉΓòÉ
Most of these options can be performed using the GUI interface via the Picture
Push Buttons.
Files
The Files option allow for the manipulation of the Schedules and Scripts.
Schedules
Schedules will contain the automation task required on a specific date at a
specific time.
Select
The Select option allows for the selection of a Schedule which is
required to be automated or edited.
Edit
The Edit option will invoke the User's editor of choice to manipulate the
Schedule. The format of which is:
field1,field2,field3,field4,field5,field6,field7,field8,field9,field10,field11
this is commonly known as a comma delimited line where:
field1 is the From Date with a format of YYYY-MM-DD
field2 is the To Date with a format of YYYY-MM-DD
field3 is the From Time with a format of HH:MM:SS
field4 is the To Time with a format of HH:MM:SS
field5 is the Interval Time with a format of HH:MM:SS
field6 contains 5 indicators representing the week within the month. A
1 will indicate a week that is to be automated on, a 0 that it is not.
The first indicator is the first week and so on.
field7 contains 7 indicators representing the days of the week. A 1
will indicate that the day is to be automated on, a 0 that it is not.
The first indicator represents Sunday and so on.
field8 contains 12 indicators representing the months of the year. A 1
will indicate that the month is to be automated on, a 0 that it is
not. The first indicator represents January and so on.
field9 contains the name of a DateGroup file. If the extension is
missing then *.DTG is assumed. This file should contain a list of
dates in the format YYYY-MM-DD and represent dates on which automation
should not take place, for example holidays.
field10 contains the name of a DateGroup file. If the extension is
missing then *.DTG is assumed. This file should contain a list of
dates in the format YYYY-MM-DD and represent dates on which automation
will only take place, for example backups on the last day of the
month.
field11 contains the command to be issued.
Recycle
The Recycle option will halt automation and immediately start it again but
with the currently selected Schedule.
Scripts
Scripts will contain a set of commands that will conduct a particular PM
window dialogue.
The format of each line is simply a single field containing the command to
be executed, as per field11 for a Schedule.
Select
The Select option allows for the selection of a Script which is required
to be run or edited.
Edit
The Edit option will invoke the User's editor of choice to manipulate the
Script.
Run
The Run option will load the currently selected Script.
Halt
The Halt option will stop the currently runnning Script.
Date Groups
The Date Groups option will allow for the selection of, and invoke, the
User's editor of choice to manipulate a Date Group File. Dates are held in
the format "YYYY-MM-DD" for use on the day page of the Schedule Settings
Notebook. Date Group Files should have an extension of ".DTG".
Parameters
The Parameters option will allow for the selection of, and invoke, the
User's editor of choice to manipulate a Parameter File. Parameters can be
held one per line in one of two formats.
Value Format
This is where only the value of the parameter is defined, that is it is
not prefixed with "PARMn=" where n is a parameter number. The value of n
is automatically assigned from the beginning of the parameter file,
starting at one, and incremented after each Value formatted line.
Assignment Format
This line is of the format "PARMn=Value" where n is the assigned
parameter number. This line does not effect the automatic numbering of
the Value only format.
These parameters can be loaded using the "Load Parameter" internal command
and used for sending to Multi Line Entry Fields or pasting to a DOS/OS2
window. As an example you could load parameter file ABC.PRM with SQL being
carefull to leave values to be substituted on a seperate line. These values
will be assigned a PARM value depending on the line on which they appear. In
a second parameter file XYZ.PRM you would assign these parameters a value
for this run (i.e. a WHERE clause). Then by using the "Output Parameter"
internal command the substituted SQL could be sent to a Query MLE window.
Exit
The Exit option will stop Automation and halt AUTOS2.
Options
The Options Menu item will allow for User settings.
Editor
Here the User can enter a command that will invoke an Editor of choice.
By imbedding the word "EdName" the User can specify where the member to be
edited must be placed on the command line.
For example:
Start E.EXE EdName
Automation
The Automation option will allow for Automation to be switched on if it is
off, or switched off if it is on.
On
The On option will switch on automation.
Off
The Off option will switch off automation.
Log
The Log option will allow for the Logging to be switched on if it is off, or
switched off if it is on.
On
The On option will switch on logging.
Off
The Off option will switch off logging.
Show Hints
The Show Hints option will allow for the Showing of a window's hint text to
be switched on if it is off, or switched off if it is on.
On
The On option will switch on Hint text.
Off
The Off option will switch off Hint text.
Setup
The Setup option allows for the entry of INI file type entries.
Allowable entries are:
Editor=entry1
Where entry1 is the startup command for an Editor.
Auto=entry2
Where entry2 can be Y or N being to required setting for Automation at
startup.
Log=entry3
Where entry3 can be Y or N being the required setting for Logging at
startup.
Startup_Schedule=entry4
Where entry4 is a preselected Schedule pathname.
Startup_Script=entry5
Where entry5 is a preselected Script pathname.
Help
Help Information.
Online...
Online Help document for the Main Window.
About...
Product Information.
ΓòÉΓòÉΓòÉ 2.1.1. Picture Push Buttons ΓòÉΓòÉΓòÉ
The two Picture Push Buttons represent Schedules and Scripts with the Alarm
Clock and Scroll respectively.
These buttons also represent the entry into the GUI side of AUTOS2. Where most
of the cumbersome Main Menu Items are replaced by mouse clicks.
By LMB clicking on either one you will be presented with a new window showing
all of the currently available entries, where each represents a file. Each
Alarm Clock represents a Schedule (*.SCD) file and the Scroll represents a
Script (*.SCR) file.
ΓòÉΓòÉΓòÉ 3. Iconised Schedules/Scripts Window ΓòÉΓòÉΓòÉ
This window holds an icon representing the relevant entity, Schedule or Script.
By pressing the RMB you can reveal a context sensitive menu. The Menu Items
will depend on if you RMB on an icon or on white space (the background to the
icons).
Continued
ΓòÉΓòÉΓòÉ 3.1. Context Menu Items ΓòÉΓòÉΓòÉ
The context menu shown depends on if the icon or white space received the RMB.
Icon Context Menu Items
This menu is shown if the icon has received the RMB.
These Items consist of:
Automation On
Only available for Schedules and the fact that Automation is currently off.
This is the default action for a LMB Double Click on a Schedule icon.
Run
Only available for Scripts. This is the default action for a LMB Double
Click on a Script icon.
Expand
This option will present the Iconised Expanded View window for the
Schedule/Script selected.
Update
This option will present the Iconised Update View window for the
Schedule/Script selected.
Copy
This option will allow for the copying of the Schedule/Script selected.
Delete
This option will allow for the deletion of the Schedule/Script selected.
White Space Context Menu Items
This menu is shown if the window background (White Space) has received the RMB.
These Items consist of:
Add
This option allows for the addition of a new Script/Schedule. This is the
default action for a LMB Double Click on white space.
Sort
This option will sort the window contents in ascending caption sequence.
Arrange
This option allows the window contents to be arranged neatly within the
available window space.
ΓòÉΓòÉΓòÉ 4. Iconised Expanded/Update View Window ΓòÉΓòÉΓòÉ
This window holds an icon representing the relevant entity, depending on the
command to be invoked.
By pressing the RMB on an icon you can reveal a context sensitive menu.
Continued
ΓòÉΓòÉΓòÉ 4.1. Context Menu Items ΓòÉΓòÉΓòÉ
Icon Context Menu Items
This menu is shown if the icon has received the RMB.
These Items consist of:
Update
This option will allow for an Update View window to be opened for the
selected entity.
Only available to Schedule or Script invoking icons.
Insert
This option will allow for an insertion of a command to be made into a
Schedule or Script.
Only available to icons in Update View windows, and the inserted entry will
follow the icon that received the RMB.
Delete
This option will allow for a deletion of a command to be made from a
Schedule or Script.
Only available to command icons in Update View windows, and the deleted
entry is represented by the icon that received the RMB.
Settings
This option will allow for a command to have it's settings altered.
This is achieved by the use of a Notebook style dialogue.
Only available to command icons in Update View windows, and the settings
represent those of the icon that received the RMB.
ΓòÉΓòÉΓòÉ 5. Notebook ΓòÉΓòÉΓòÉ
The Settings Notebook can only be accessed via the Update View Window, by RMB
on a command icon and selecting Settings from the context menu.
Continued
ΓòÉΓòÉΓòÉ 5.1. Notebook Settings ΓòÉΓòÉΓòÉ
There are four Tabs attached to the Settings Notebook:
Command
Dates
Times
Days
Only the Command Tab is shown if the RMB was on a Script command otherwise all
four are available.
Command
For this page the following entries may be made:
Internal Command
If an internal command is required to be executed (non OS2 command line
entry) then a drop down list can be obtained to be selected from by clicking
on the right side down arrow. Select the option required by clicking on it.
To jump to the entry required then type in the first few letters into the
protected entry field until the correct entry is shown.
Repeat
An entry can be made here, between 1 and 99, to represent a repetition
factor if an internal command had been selected. For instance if Send
Control String had been selected then whatever Control is sent will be done
so n times depending on the repeat value.
If the Wait Period internal command was selected then this would represent
the number of seconds to wait.
External Command or Internal Parameter
This Entry Field will contain either an External OS2 command to be executed
or if an Internal command had been selected then this entry will be treated
as the parameter. Say for instance the Send Control String internal command
had been selected then this could be set to {down} to emulate a down arrow
key depression.
Dates
For this page the following entries may be made:
From Date
For this entry three fields are provided to contain the Year, Month and Day
that the automation for the command is to begin.
To Date
For this entry three fields are provided to contain the Year, Month and Day
that the automation for the command is to end.
Times
For this page the following entries may be made:
From Time
For this entry three fields are provided to contain the Hour, Minute and
Second that the automation for the command is to begin.
To Time
For this entry three fields are provided to contain the Hour, Minute and
Second that the automation for the command is to end.
Interval Time
For this entry three fields are provided to contain the Hour, Minute and
Second for the interval that is allowed to elapse before the command is
repeated. This is handy for monitoring type commands that need to be
executed on a regular interval type basis.
Days
For this page the following entries may be made:
Every
Within this group are 5 check boxes for the week in the month. If it is
checked then the command will be executed this week.
Also there a 7 check boxes for the days of the week. If it is checked then
the command will be executed on that particular day.
In
Within this group are 12 check boxes for the months of the year. If it is
checked then the command will be executed this month.
Date Groups
Within this group are two entries:
Not On
Using the drop down list box a previously created Date group file can be
selected to represent the dates that automation is not to take place.
Only On
Using the drop down list box a previously created Date group file can be
selected to represent the dates that automation is only to take place on.
ΓòÉΓòÉΓòÉ 6. External Command ΓòÉΓòÉΓòÉ
This is a Command that can be selected from the Settings Notebook.
ΓòÉΓòÉΓòÉ 6.1. Command Line ΓòÉΓòÉΓòÉ
This can be any command that could be entered on an OS2 command line. In order
to get the correct settings for a program to run it may be better to use the
Run Tasks Internal Command.
ΓòÉΓòÉΓòÉ 7. Internal Commands ΓòÉΓòÉΓòÉ
These are a list of all the Internal Commands that can be selected from the
Settings Notebook.
For each one an example is given as how to code it if manually editing a
command as per field11 in the comma delimited line.
Any Internal Command parameter entry may contain parm1 parm2 etc. These may be
entered in order to pick up values previously set by an earlier Parameter
Internal command.
ΓòÉΓòÉΓòÉ 7.1. Parameters ΓòÉΓòÉΓòÉ
These commands are used to manipulate parameters.
ΓòÉΓòÉΓòÉ 7.1.1. Add Parameters ΓòÉΓòÉΓòÉ
This command will perform a bulk parameter load.
The Internal parameter is a Path name of a text file containing parameters.
Record one contains the value of the next available PARM variable since the
previous Add/Load parameter. If the extension is missing then ".PRM" is added
to the Path name. These parameters are held internally using the variables
PARM1, PARM2 etc. A parameter assignment such as, PARM6=abc, may be included in
the parameter file. Parameter records with an "*" in column 1 or blank records
or assignment records do not count when assigning a parameter number.
Example:
[AP]PathName
ΓòÉΓòÉΓòÉ 7.1.2. Input Parameter ΓòÉΓòÉΓòÉ
This command will prompt for a parameter value.
The Internal parameter is optionally a Caption name to best describe this
parameter.
Example:
[GP](n)CaptionName
Where n represents the parameter number, set by the Repeat factor in the
Notebook Command Page.
ΓòÉΓòÉΓòÉ 7.1.3. Load Parameters ΓòÉΓòÉΓòÉ
This command will perform a bulk parameter load.
The Internal parameter is a Path name of a text file containing parameters.
Record one contains the value of parameter 1 and so forth. If the extension is
missing then ".PRM" is added to the Path name. These parameters are held
internally using the variables PARM1, PARM2 etc. A parameter assignment such
as, PARM6=abc, may be included in the parameter file. If this record is
encountered after to the 6th record then it will take precedence. Parameter
records with an "*" in column 1 or blank records or assignment records do not
count when assigning a parameter number.
Example:
[LP]PathName
ΓòÉΓòÉΓòÉ 7.1.4. Paste Parameter ΓòÉΓòÉΓòÉ
This command will paste a parameter to an identified Window. This has the same
effect as copying to the clipboard and then selecting the menu paste command.
The Internal parameter is optionally an asterisk which signifies output many
parameters.
Example:
[PP](n)*
Where n represents the parameter number, set by the Repeat factor in the
Notebook Command Page. Or if the asterisk is added then n parameters will be
pasted.
ΓòÉΓòÉΓòÉ 7.1.5. Output Parameter ΓòÉΓòÉΓòÉ
This command will output a parameter value as a keystring.
The Internal parameter is optionally an asterisk which signifies output many
parameters.
Example:
[SP](n)*
Where n represents the parameter number, set by the Repeat factor in the
Notebook Command Page. Or if the asterisk is added then n parameters will be
output, normally to a Multi Line EntryField (MLE).
ΓòÉΓòÉΓòÉ 7.1.6. Write Parameters ΓòÉΓòÉΓòÉ
This command will perform a bulk parameter write.
The Internal parameter is a Path name of a text file to contain the parameters.
Record one contains the value of parameter 1 and so forth. If the extension is
missing then ".PRM" is added to the Path name. These parameters are held
internally using the variables PARM1, PARM2 etc.
Example:
[WP](n)PathName
Where n represents the number of parameters to write, set by the Repeat factor
in the Notebook Command Page.
ΓòÉΓòÉΓòÉ 7.2. Files ΓòÉΓòÉΓòÉ
These commands are used to manipulate files.
ΓòÉΓòÉΓòÉ 7.2.1. Add File ΓòÉΓòÉΓòÉ
This command will add a file to the work file.
The Internal parameter is a Path name of a text file.
Example:
[AF]PathName
ΓòÉΓòÉΓòÉ 7.2.2. Load File ΓòÉΓòÉΓòÉ
This command will perform a file load of the work file.
The Internal parameter is a Path name of a text file. The file load will
initialise the work file before loading it.
Example:
[LF]PathName
ΓòÉΓòÉΓòÉ 7.2.3. Write File ΓòÉΓòÉΓòÉ
This command will perform a file write.
The Internal parameter is a Path name of a text file. This file will be
initialised and copied to from the work file.
Example:
[WF]PathName
ΓòÉΓòÉΓòÉ 7.2.4. File Exist? ΓòÉΓòÉΓòÉ
This command will run a script if a File was found for the Load or Add File
commands.
The Internal parameter is the Script name and is required.
Example:
[FE]ScriptName
This command is similar to the Run Script command, but the Script is only run
if a file has been loaded or added.
This command will detect if a file has been found, the check is against the
last attempt to load or add a file. So if nesting this command within scripts
it may be safer to precede each check with a Load File Internal command to make
sure the test is for the correct file.
ΓòÉΓòÉΓòÉ 7.2.5. File Not Exist? ΓòÉΓòÉΓòÉ
This command will run a script if a File has not been found for the Load or Add
File command.
The Internal parameter is the Script name and is required.
Example:
[FN]ScriptName
This command is similar to the Run Script command, but the Script is only run
if a file has not been loaded or added.
This command will detect if a file has not been found, the check is against the
last attempt to loaad or add a file. So if nesting this command within scripts
it may be safer to precede each check with a Load File Internal command to make
sure the test is for the correct file.
ΓòÉΓòÉΓòÉ 7.3. Windows ΓòÉΓòÉΓòÉ
These commands are used to manipulate windows.
ΓòÉΓòÉΓòÉ 7.3.1. Highlight Window ΓòÉΓòÉΓòÉ
This command will give focus to a currently identified Window.
The Internal parameter is optionally a Window name.
Example:
[HW](n)WindowName
Where n represents the number of attempts to be made to identify the Window,
set by the Repeat factor in the Notebook Command Page.
ΓòÉΓòÉΓòÉ 7.3.2. Identify Window ΓòÉΓòÉΓòÉ
This command will attempt to Identify a Window.
The Internal parameter is a Window name (or "?") and is required.
Example:
[IW](n)WindowName
Where n represents the number of attempts to be made to identify the Window,
set by the Repeat factor in the Notebook Command Page. If the window required
is focused and the title Window name unknown then a "?" may be used to identify
the window.
ΓòÉΓòÉΓòÉ 7.3.3. Log Window Class List ΓòÉΓòÉΓòÉ
This command will log the Window Class structure starting from an identified
Window. If the log is not visible it may be in the Minimised Window Viewer
window.
The Internal parameter is optionally a Window name.
Example:
[WL](n)WindowName
Where n represents the number of attempts to be made to identify the Window,
set by the Repeat factor in the Notebook Command Page.
ΓòÉΓòÉΓòÉ 7.3.4. Maximise Window ΓòÉΓòÉΓòÉ
This command will maximise an identified Window.
The Internal parameter is optionally a Window name.
Example:
[MX](n)WindowName
Where n represents the number of attempts to be made to identify the Window,
set by the Repeat factor in the Notebook Command Page.
ΓòÉΓòÉΓòÉ 7.3.5. Minimise Window ΓòÉΓòÉΓòÉ
This command will minimise an identified Window.
The Internal parameter is optionally a Window name.
Example:
[MN](n)WindowName
Where n represents the number of attempts to be made to identify the Window,
set by the Repeat factor in the Notebook Command Page.
ΓòÉΓòÉΓòÉ 7.3.6. Next Entry Field ΓòÉΓòÉΓòÉ
This positions at the next Entry Field class within an identified Window.
The Internal parameter is optionally a Window name.
Example:
[NE](n)WindowName
Where n represents the Entry Field number, set by the Repeat factor in the
Notebook Command Page.
ΓòÉΓòÉΓòÉ 7.3.7. Next Frame ΓòÉΓòÉΓòÉ
This positions at the next Frame class within an identified Window.
The Internal parameter is optionally a Window name.
Example:
[NF](n)WindowName
Where n represents the Frame number, set by the Repeat factor in the Notebook
Command Page.
ΓòÉΓòÉΓòÉ 7.3.8. Next ListBox ΓòÉΓòÉΓòÉ
This positions at the next ListBox class within an identified Window.
The Internal parameter is optionally a Window name.
Example:
[NL](n)WindowName
Where n represents the ListBox number, set by the Repeat factor in the Notebook
Command Page.
ΓòÉΓòÉΓòÉ 7.3.9. Next Menu ΓòÉΓòÉΓòÉ
This positions at the next Menu class within an identified Window.
The Internal parameter is optionally a Window name.
Example:
[MU](n)WindowName
Where n represents the Menu number, set by the Repeat factor in the Notebook
Command Page.
ΓòÉΓòÉΓòÉ 7.3.10. Next WindowClass ΓòÉΓòÉΓòÉ
This positions at the next specified Window class within an identified Window.
The Internal parameter is a Window Class name and is required. The Window
classes for a particular Framed Window can be extracted using the Log Window
Class List command.
Example:
[NW](n)WindowClassName
Where n represents the specified Window class number, set by the Repeat factor
in the Notebook Command Page.
ΓòÉΓòÉΓòÉ 7.3.11. Restore Window ΓòÉΓòÉΓòÉ
This command will restore an identified Window.
The Internal parameter is optionally a Window name.
Example:
[RW](n)WindowName
Where n represents the number of attempts to be made to identify the Window,
set by the Repeat factor in the Notebook Command Page.
ΓòÉΓòÉΓòÉ 7.3.12. Window Exist? ΓòÉΓòÉΓòÉ
This command will run a script if a Window has been identified.
The Internal parameter is the Script name and is required.
Example:
[IF]ScriptName
This command is similar to the Run Script command, but the Script is only run
if a window has been identified either explicitly or implicitly.
This command will detect if a window has been identified, the check is against
the last attempt to identify a window. So if nesting this command within
scripts it may be safer to precede each check with an Identify Window Internal
command to make sure the test is for the correct window.
ΓòÉΓòÉΓòÉ 7.3.13. Window Not Exist? ΓòÉΓòÉΓòÉ
This command will run a script if a Window has not been identified.
The Internal parameter is the Script name and is required.
Example:
[LS]ScriptName
This command is similar to the Run Script command, but the Script is only run
if a window has not been identified either explicitly or implicitly.
This command will detect if a window has not been identified, the check is
against the last attempt to identify a window. So if nesting this command
within scripts it may be safer to precede each check with an Identify Window
Internal command to make sure the test is for the correct window.
ΓòÉΓòÉΓòÉ 7.4. Task Control ΓòÉΓòÉΓòÉ
These commands are used to manipulate tasks.
ΓòÉΓòÉΓòÉ 7.4.1. Open Tasks Folder ΓòÉΓòÉΓòÉ
This command will open a TaskGroup folder.
The Internal parameter is the Task Group Name.
Example:
[OF](n)TaskGroupName
Where n represents a delay in seconds before an attempt is made to identify it,
set by the Repeat factor in the Notebook Command Page.
TaskGroupName is derived from the File information shown on the File page of
the folder's Settings Notebook. After clicking on the File Tab concatenate the
Path and Name entries together, inserting a "\" between the two fields.
ΓòÉΓòÉΓòÉ 7.4.2. Run Tasks ΓòÉΓòÉΓòÉ
This command will open a TaskGroup folder and run the specified number of
tasks.
The Internal parameter is the Task Group Name and is required.
Example:
[RT](n)TaskGroupName
Where n represents the number of tasks to run, set by the Repeat factor in the
Notebook Command Page.
TaskGroupName is derived from the File information shown on the File page of
the folder's Settings Notebook. After clicking on the File Tab concatenate the
Path and Name entries together, inserting a "\" between the two fields.
The folder representing the Task Group should have a view setting of Icon View
Flowed, to ensure the tasks are executed in the correct sequence. The execution
sequence always starts with the first icon in the Task Group.
ΓòÉΓòÉΓòÉ 7.5. Keyboard ΓòÉΓòÉΓòÉ
These commands are used to manipulate keystrokes.
ΓòÉΓòÉΓòÉ 7.5.1. Paste Control String ΓòÉΓòÉΓòÉ
This command will paste the Control String to an identified Window. This has
the same effect as copying to the clipboard and then selecting the menu paste
command.
The Internal parameter is a Control String and is required.
Example:
[PC](n)ControlString
Where n represents the number of times to send the Control String, set by the
Repeat factor in the Notebook Command Page.
ΓòÉΓòÉΓòÉ 7.5.2. Paste Key String ΓòÉΓòÉΓòÉ
This command will paste a key string to an identified Window. This has the same
effect as copying to the clipboard and then selecting the menu paste command.
The Internal parameter is the Key String and is required.
Example:
[PK](n)KeyString
Where n represents the number of times to send the Key String, set by the
Repeat factor in the Notebook Command Page.
ΓòÉΓòÉΓòÉ 7.5.3. Send Control String ΓòÉΓòÉΓòÉ
This command will enter the Control String into an identified Window.
The Internal parameter is a Control String and is required.
Example:
[SC](n)ControlString
Where n represents the number of times to send the Control String, set by the
Repeat factor in the Notebook Command Page.
ΓòÉΓòÉΓòÉ 7.5.4. Send Key String ΓòÉΓòÉΓòÉ
This command will enter the key string into an identified Window.
The Internal parameter is a Key String and is required.
Example:
[SK](n)KeyString
Where n represents the number of times to send the Key String, set by the
Repeat factor in the Notebook Command Page.
ΓòÉΓòÉΓòÉ 7.6. Automation ΓòÉΓòÉΓòÉ
These commands are used to manipulate AUTOS/2.
ΓòÉΓòÉΓòÉ 7.6.1. Automation Off ΓòÉΓòÉΓòÉ
This command will terminate Automation if it is On.
Example:
[AO]
There are no parameters.
ΓòÉΓòÉΓòÉ 7.6.2. Recycle ΓòÉΓòÉΓòÉ
This command will recycle Automation. This has the same effect as Automation
Off followed by Automation On.
The Internal parameter is optionally a Schedule Name.
Example:
[RC]ScheduleName
ΓòÉΓòÉΓòÉ 7.6.3. Run Script ΓòÉΓòÉΓòÉ
This command will run the specified Script.
The Internal parameter is the Script name and is required.
Example:
[RS]ScriptName
ΓòÉΓòÉΓòÉ 7.6.4. Sleep Interval ΓòÉΓòÉΓòÉ
This command will allow for the setting of the number of seconds to elapse
before the Task Manager should poll for more work. This setting will increase
timing accuracy at the expense of higher CPU requirement. The default setting
is 5 seconds.
There is no Internal parameter.
Example:
[SI](n)
Where n represents the number of seconds to sleep, set by the Repeat factor in
the Notebook Command Page.
ΓòÉΓòÉΓòÉ 7.6.5. User Exit ΓòÉΓòÉΓòÉ
This command will execute an external program synchronously.
The Internal parameter is a program name which is required, plus optional
parameters.
This Internal command will allow for the synchronous execution of any program.
It will be treated as an external routine as per the REXX information online
material. Any required parameters should be included in the command as if it
were issued from the OS/2 command prompt. No syntax checking is performed on
this command before presenting it to the command processor. Likewise the
external comand will cause AUTOS/2 to possibly fail should the user exit not
execute correctly.
Example:
[UE]ProgName Arg1 Arg2....Argn
ΓòÉΓòÉΓòÉ 7.6.6. Wait Period ΓòÉΓòÉΓòÉ
This command will allow for a number of seconds to elapse before processing the
next command.
There is no Internal parameter.
Example:
[WT](n)
Where n represents the number of seconds to sleep, set by the Repeat factor in
the Notebook Command Page.
ΓòÉΓòÉΓòÉ 8. Control Strings ΓòÉΓòÉΓòÉ
The following names can be used, enclosed in {} to represent a ControlString:
Enter
Alt
Ctrl
Shift
Tab
BackTab
BackSpace
Home
Ins
Del
End
Esc
NewLine
PgUp
PgDown
Right
Left
Up
Down
Fn where n=1 to 12
Example:
[SC](2){Down}
This would depress the Down arrow twice.
It would be good practice to have a single ControlString per Send Control
command, although multiple entries are supported. The Paste Control command
only supports one entry per command.
ΓòÉΓòÉΓòÉ 9. Hints and Tips ΓòÉΓòÉΓòÉ
Before embarking on a window dialogue, it would be wise to become familiar with
the class structure of that window. The Log Window Class List command is
available for this and will create an entry in the log similar to:
FRAME
TITLEBAR
MENU
MENU
FRAME
STATIC
STATIC
BUTTON
BUTTON
MENU
Normally the Menu Bar is the Menu class at the end of the log, where the first
Menu is the Icon Menu.
To depress the second button a hand edited script might look like:
[IW]WindowName
[NF]
[HW]
[SC]{Down}
[SC}{Enter}
The GUI equivelant Internal Commands would be:
Identify Window
Next Frame
Highlight Window
Send Control String
Send Control String
With the appropriate Internal Parameters of course. Note that the keys are
being sent to the Frame Class window as the down arrow does not switch focus,
only moves the cursor.
If you are trying to navigate a group of radio buttons then the method is
slightly different. First we need to get to the BUTTON Window Class. Normally
the button has an associated STATIC description with an underlined letter to
attract the cursor. So if we had two buttons in a group and one was "Yes" and
the other "No" and you wanted to select "No" then the following edited commands
should work:
[HW]WindowName
[NW]BUTTON
[SK]Y
[SC]{Down}
To run a program that requires VIO support you must redirect the output
otherwise you may get a REXX error SYS0436. For PSTAT you would enter:
/win pstat <con >con
For programs that write to Standard Error you should add the 2>con as follows:
/win pstat <con >con 2>con
AUTOS2 main intent is to conduct the scheduling of tasks and support the
initiation of events. If an application has it's own internal macro/scripting
language, this should be used in preference. Simply use AUTOS2 to kick off the
process at a pre-determined Date/Time.
Particularly OS2/DOS windows can be pasted into but excessive use of this
method can prove unreliable.
ΓòÉΓòÉΓòÉ 10. Examples ΓòÉΓòÉΓòÉ
The following examples are shown as if created using the hand edited method.
ΓòÉΓòÉΓòÉ 10.1. Process Monitoring ΓòÉΓòÉΓòÉ
To monitor a process you would enter a schedule something like:
*,*,*,*,00:00:10,11111,1111111,111111111111,<None>,<None>,[IW]E.EXE - FilePathName
*,*,*,*,00:00:10,11111,1111111,111111111111,<None>,<None>,[LS]StartEd
These entries are all defaults except the Interval value of every 10 seconds. A
Script called StartEd.SCR would need to be created to invoke the Editor on file
FilePathName. This Schedule will:
Attempt to Identify the editor window for FilePathName.
If not found then run Script StartEd.SCR.
This will be repeated every 10 seconds so that if for some reason the editor
session fails it will get restarted again automatically.
Schedule CHKWIN.SCD and Scripts EDA.SCR, EDB.SCR, DOEDA.SCR, DOEDB.SCR and
DOEDC.SCR have been included to demonstrate monitoring.
Editor sessions have been used for this example, as most systems should be able
to cater for this scenario.
First start AUTOS2 and LMB on the Schedule Icon
RMB on the CHKWIN.SCD icon to expose the Context Sensitive Menu
LMB on the Expand option to expand the Schedule, the expanded view works
similar to the Tree View option on any Folder
Keep expanding the branches, by LMB on the + signs, to get a full picture of
the Schedule
This Schedule will:
Check to see if there is an edit session for file C
If there is not:
Check to see if there is an edit session for file B
If there is not then start an edit session for file B
If there is an edit session for file C then:
Check to see if there is an edit session for file A
If there is not then start an edit session for file A
To start Schedule CHKWIN.SCD then LMB double click on it's icon. Initially
there should be no edit session for file C so a check will be made for an edit
session on file B. There should not be one found so one will be started.
Another check is made for a file C edit session but this time a branch will
only be taken if it exists, but it does not yet.
These checks are set to be repeated every 10 seconds, this can be confirmed by
Restoring the Log window which can be found in the Minimised Window Viewer.
This will log all failed attempts at recognising a Window, or edit sesson.
You can now change the Schedules behaviour by dropping and invoking different
editor sessions. If you close edit session B, while there is no edit session C,
then edit session B will be reinvoked. This is the monitoring effect. Edit
session B could quite easily be a LAN session at which point you could invoke
the LAN startup process.
To create an edit sesson for C Script DOEDC.SCR is provided. This can be
invoked by going back to the Main AUTOS2 window, it will need restoring if
minimised. LMB on the Script icon to bring up the Scripts Window. LMB double
click on the DOEDC.SCR icon to invoke an edit session for file C.
You should now notice an edit session for file A appear, as well as file C, as
we have switched monitoring from file B to file A. This can be checked by
closing the edit sessions for both file A and B and only edit session on file A
should re-appear.
Note that you are still able to run Scripts while a Schedule is running (i.e.
Automation is On). To swith Off Automation use the Main Window Menu -
Options/Automation/Off and the Task Manager thread will be halted.
ΓòÉΓòÉΓòÉ 10.2. OS2/DOS Window Session ΓòÉΓòÉΓòÉ
[IW]DOS Window
[MU]
[PK]cd\
[PC]{Enter}
[PK]dir
[PC]{Enter}
The above hand edited script will:
Identify the DOS window
Locate the Icon Menu
Paste the keys to change to the root directory
Press the Enter key
Paste the keys to issue the directory list command
Press the Enter key
The Script DOS.SCR has been included to demonstrate this. A Dos Window session
should be current for the example to work. Simply open the Scripts window by
LMB on the Script Icon. Then LMB Double Click on the DOS.SCR icon.
ΓòÉΓòÉΓòÉ 10.3. Task Group ΓòÉΓòÉΓòÉ
To utilise the Run Tasks facility the following steps should be taken:
Create a folder of choice
Identify the TaskGroupName from the File information shown on the File page
of the folder's Settings Notebook. After clicking on the File Tab
concatenate the Path and Name entries together, inserting a "\" between the
two fields.
Set the Icon View setting to Flowed.
For each task required to be performed create the required shadow inside the
Task Group Folder.
It is now possible to create the following hand edited Script:
[RT](4)TaskGroupName
This will run the first 4 Tasks within the Task Group.
Sometimes a little experimentatioin is required to aachieve the required
results. For instance a hand edited script to close an OS/2 command session
window might look like:
[HW]CMD.EXE
[MU]
[SK]c
[WT](2)
[HW]CMD.EXE
[SC]{Down}
[SC}{Enter}
The GUI equivelant Internal Commands would be:
Highlight Window
Next Menu
Send Key String
Wait
Highlight Window
Send Control String
Send Control String
Here you would have expected a simple {Left} Control String to be sufficient,
but a button that has the focus is not neccessarily the one that receives the
keystroke.
Some applications use unusual window classes hence the Next Window Internal
Command. You may find a keystroke, or Control String, needs to be sent to the
most unlikely Window Class. For instance {Alt}{F4} does not always work on the
first Menu Window Class, you may need to try them all to succeed. This is
another good reason to divide up any lengthy dialogues to ease testing.
ΓòÉΓòÉΓòÉ 11. Troubleshooting ΓòÉΓòÉΓòÉ
If for some reason AUTOS2 isn't giving the results you expect the first place
to look is the log. On startup the log is minimised, so most likely you will
find it in the Minimised Window Viewer. Check through the messages for a clue
as to what may have caused the problem. If you are still unable to resolve it
please contact Squiredeck using the information on the Help About panel.
ΓòÉΓòÉΓòÉ 12. Registration ΓòÉΓòÉΓòÉ
To become a registered user and receive upgrades, fixes, support etc., please
fill in your details in the form provided in the distributed REGO.TXT text
file. This information may change from time to time so please check it's
contents for instructions. Any problems then please do not hesitate to contact
Squiredeck via our email address on the Help About window.
All comments, positive or negative, will be gratefully received.
Thank you for looking at AUTOS2.