• 沒有找到結果。

4.3 Semantics

4.3.2 Command Statements

The definition of the different command statements of the language and their type compatibility rules are stated bellow. In the event of breaking any of the rules specified, the system triggers an incompatible type exception with its corresponding warning to the user, halting command execution.

Assignment Commands

Assignment Commands focus on assigning values to system internal identifiers.

setDistance

The setDistance command is used to set the distance that the mouse cursor will use during user command-driven movement.

Usage:

setDistance to distance x

“setDistance to short”

The distance gets set to short

The setDistance command is only compatible with types distance and the operator to.

setDragSpeed

The setDragSpeed command is used to set the speed that the mouse cursor will use during user command-driven movement.

Usage:

setDragSpeed speed x

“setDragSpeed fast”

The speed of the mouse cursor is set to fast, when the cursor moves through commands it will do so at a faster pace.

The setDragSpeed command is only compatible with type speed.

addActorProfile

The addActorProfile command is used for creating an actor profile. It is a stand-alone command thus it does not interact with any identifiers or operators.

Usage:

addActorProfile

A new actor profile gets created by the system

The addActorProfile command can only be used as stand-alone.

eraseProfile

The eraseProfile command is used for deleting an existing specified actor profile.

Usage:

eraseProfile actorprofile x “eraseProfile Profile1”

The specified actor profile is erased

The eraseProfile command is compatible with the type actorprofile only.

addActor

The addActor command is used for creating an actor to a specific coordinate or square, it can also be used as a standalone command where the actor’s location is chosen automatically by the system.

Usage:

addActor

The actor gets instantiated to system selected location.

addActor to coordinate x

“addActor to 3,5”

The actor gets instantiated to the user specified location

The command addActor is compatible with the type square and coordinate.

eraseActor

The eraseActor command is used for deleting an existing specified actor.

Usage:

eraseActor actor x

“eraseActor Actor1”

The specified actor is erased

The eraseActor command is compatible with the type actor only.

setActor

The setActor command is used for fixing an already instantiated actor to a corresponding coordinate or square.

Usage:

setActor actor x to coordinate x

“setActor Actor1 to 10,3”

The actor gets fixed to the coordinate 10,3 of a grid.

The setActor command is only compatible with the type actor, coordinate, square and the operator to.

resetActor

The resetActor command is used for re-setting the location of the currently selected actor to its

previous location.

Usage:

resetActor

The current actor is fixed to its previous location.

The resetActor command is a standalone command.

setDrop

The setDrop command is used for disabling the drop of drag commands. Performing a drop if set to true (system’s default), and a not performing a drop when set to false.

Usage:

setDrop boolean x

“setDrop false”

Triggers the system to disable the drop event when a drag is executed, thus hanging on the object that is being dragged.

The setDrop command is only compatible with the type Boolean.

setList

The setList command is use to give focus to the system’s visual-aid lists, displaying them graphically.

Usage:

setList VisList x

“setList actorlist”

Trigger the system to give focus to the specified list in this way will display it to the user.

The setList command is only compatible with the type VisList.

setVisualAide

The setVisualAide command when set, allows the user to see visual aid content such as labeling of buttons, and grid coordinates. When not set, the system simply displays bounding boxes with out a textual description.

Usage:

setVisualAide boolean x

“setVisualAide true”

Trigger the system to enable visual aid in the application, will textually identify interfacing objects.

The setVisualAide command is only compatible with the type Boolean.

showGrid

The showGrid command when set, allows the user to hide or show the present displayed grid if any.

Usage:

showGrid boolean x

“showGrid false”

This will trigger the system to hide the present grid.

The showGrid command is only compatible with the type Boolean.

usingActor

The usingActor command is used for enabling and disabling actor interaction.

Usage:

usingActor boolean x

“usingActor false”

This will trigger the system to disable all interaction with actors, hiding them from the user.

The usingActor command is only compatible with the type Boolean.

Action Commands

The command type “action” focuses on interacting with application system’s interfacing content, performing actions that directly affect the target application.

drag

The drag command is used for dragging of the mouse cursor, applied to type direction, pattern, speed and distance. When invoked the respective mouse movement will occur (depending on operand) and simultaneously activating the left click of the mouse, in this way emulating a drag.

Usage:

drag direction x by distance x

“drag north by Long”

The mouse is “dragged” in the specified direction.

drag pattern x by distance x

“drag spiral by short”

Again a “dragging” occurs, but this time it follows a predefined dragging pattern and performs each segment of the pattern at short distance, resulting in a small spiral.

The drag command is only compatible with the type directon, pattern,speed, distance and the operator by.

dragSquare

The dragSquare command is used to drag a specific square to a specified coordinate or square or by a specified moving pattern or in the specified direction by the defined distance and by the selected speed.

Usage:

dragSquare square x to coordinate x

“dragSquare tree to 7,3”

The cursor is focused on the specified square and then performs a drag to the given destination.

dragSquare square x direction x by distance y

“dragSquare tree northeast by verylong”

The cursor is focused on the specified square and then performs a drag in the given direction moving at the specified distance.

dragSquare square x by pattern x by distance x

“dragSquare tree by zigzag by medium”

The cursor is focused on the specified square and then performs a drag in the given pattern moving at the specified distance.

The dragSquare command is compatible with the type square, coordinate, direction, distance, pattern, speed and the operators by and to.

dragCoordinate

The dragCoordinate command is the same as the dragSquare with the exception that is used to drag the type coordinate. When invoked, the specified coordinate will be dragged to the specified coordinate or square, by the defined pattern, or in the specified direction by the defined distance and by the selected speed depending on the usage.

The dragCoordinate command is compatible with the type square, coordinate, direction, distance, pattern, speed and the operators by and to.

dragActor

The dragActor command is the same as the dragSquare with the exception that is used to drag the type actor. When invoked, the specified actor will be dragged to the specified coordinate or

square, by the defined pattern, or in the specified direction by the defined distance and by the selected speed depending on the usage.

The dragActor command is compatible with the type actor, coordinate, direction, distance, pattern, speed and the operators by and to.

click

The click command triggers a click at the current cursor position and is used in conjunction with the operator by and the identifier clicktype only.

Usage:

click

When executed, a click will be triggered on the current cursor location.

click by clicktype x

“click by rightclick”

When executed, a click will be triggered on the current cursor location in the specified mode.

The click command is compatible with the type clicktype and the operator by

clickSquare

The clickSquare command triggers the cursor to first move to the square location specified by square x, and then triggers a click in the fashion specified by the clicktype identifier, if any.

Usage:

clickSquare square x by clicktype x “clickSquare house by rightclick”

When executed, the cursor will move to the corresponding square’s location and trigger a click of the type specified (if not specified it will click as the default click (leftclick) )

The clickSquare command is compatible with types square, clicktype and the operator by.

clickActor

The clickActor Command functions in the exact way as the clickSquare command with the exception that Actors are being clicked.

The clickActor command is compatible with type actor, clicktype and the operator by.

clickCoordinate

The clickCoordinate Command functions in the exact way as the clickSquare command with the exception that the types being clicked are Coordinates.

The clickCoordinate command is compatible with type coordinate, clicktype and the operator by.

move

The move command is used for moving the mouse cursor, and it’s applied to variables of type square, coordinate and direction and operators to and by.

Usage:

move to typesquare x

“move to house”

When invoked the cursor moves to the specified square location

move to typecoordinate (x,y)

“move to 10,3

When invoked the cursor moves to the specified coordinate location

move direction x by distance y “move southeast by verylong”

When invoked the cursor moves in the specified direction by the specified amount

The move command is compatible with type square, coordinate, direction and operators to, by.

pasteText

The pasteText command is used for pasting text into a focused text field.

Usage:

pasteText text x

“pasteText Hello”

The text variable is copied into the clipboard and pasted into the current focused text field.

The pasteText command is only compatible with the type text.

clearText

The clearText command is used for deleting text of a text field.

Usage:

clearText then loop 3 times

Three characters from the focused text field’s text are deleted.

The clearText command is a stand-alone command.

sendKey

The sendKey command is used for emulating a keyboard stroke on the specified key.

Usage:

sendKey text x

“sendKey Y”

The system emulates a keyboard stroke of the letter Y.

The sendKey command is only compatible with the type text.

openDeveloper

The openDeveloper command is used for entering the developing mode of the system through speech whenever is not possible to interact with the system’s GUI directly through the mouse.

Usage:

openDeveloper

The Developing mode is opened by the system

The openDeveloper command is a stand-alone command.

send

The send command is used for sending the stream of text already spoken to the lexical translator, in order to begin the command processing.

Usage:

send

The already spoken stream of text is sent to the lexical translator.

The send command is a stand-alone command.

undoAll

The undoAll command is used for deleting all phrases spoken in order to reset the stream of text to emptiness if a mistake was made.

Usage:

undoAll

The already spoken stream of text is cleared.

The undoAll command is a stand-alone command.

undoPhrase

The undoPhrase command is used for deleting the last phrase spoken in order to reset the stream of text to its previous content.

Usage:

undoPhrase

The last phrase spoken is deleted from the stream of already spoken text.

The undoPhrase command is a stand-alone command

captureIt

The captureIt command is used for capturing free windows (pop-ups) into the system.

Usage:

captureIt

Here the most front “free” window will be captured.

The captureIt command is a stand-alone command.

Selection Commands

The selection commands are used for switching visual interfacing content.

selectStage:

The selectStage command selects the current stage, when executed all the registered squares for that stage are loaded by the system.

selectStage stage x “selectStage stage 1”

Selects the stage identified as “stage 1” and loads all its corresponding squares, painting them onscreen.

The “selectStage” Command is only compatible with the type stage.

selectGrid:

The selectGrid command selects a grid for display, when executed all the registered squares for that grid get loaded and painted on screen by the system.

selectGrid grid x “selectGrid paintgrid”

Selects the grid identified as “paintgrid” and loads all its corresponding squares.

The “selectGrid” Command is only compatible with the type grid.

selectActorProfile:

The selectActorProfile command is used to set the current actor profile, when invoked a list of actors corresponding to the selected profile is loaded and registered actors under this profile are placed graphically on screen.

selectActorProfile actorprofile x “selectActorProfile profile 1”

Selects the actor profiled identified as “profile 1” and loads its corresponding actors onto screen.

The “selectActorProfile” Command is only compatible with the type actorprofile.

selectApplication:

The selectApplication command is used to focus a target application. If invoked, all the stages, grids and actor profiles corresponding to the specified application are automatically loaded by the system.

selectApplication app x

“selectApplication paint program”

Selects the application identified as “paint program” and loads all its corresponding stages, grids, and actor profiles.

The “selectApplication” Command is only compatible with the type app.

相關文件