Global grammars
Specific grammars
Unimacro test

The game of solitaire by voice!

With the grammar "sol" it is now possible to play solitaire by voice.

This grammar relies on mouse movement and mouse dragging commands.

The basic commands are:



card 1-7

move the mouse to one of the card piles (1, 2, 3, 4, 5, 6 or 7)

new card
go on

draw a new card

to stack 1-4

drag a card from the mouse position to one of the four stacks

to 1-7

drag a card from the mouse position to one of the seven piles

1-7 to stack 1-4

drag from one of the piles to one of the stacks

1-7 to 1-7

drag from one pile to another

card to 1-7

drag the last drawn card to one of the piles

card to stack 1-4

drag the last drawn card to one of the stacks


Additional commands:



pauses 0-7

do some pausing after each command and each movement: pauses 0-7 (0 = off, fastest actions) (default=3)

mouse (higher | lower) 1-7", 'this is useful when you position on a pile, but the mouse pointer does not point to the desired card; continue with "to 1-7"'],

stack automatically", 'after each move to all possible cards to the stacks ']])]]]

command(s) to be defined with the commands grammar:




new game

the keystroke {f2}


The complete grammar (can be changed with the command "edit solitaire"):

<card> exported = card {cnum};
<newcard> exported = new card|next|‘go on’|continue;
<to> exported = to ((stack {snum})|{cnum});
<cardto> exported = card to ((stack {snum})|{cnum});
<cardnumto> exported = [card] {cnum} to ((stack {snum})|{cnum});
<lower> exported = mouse (lower|higher) [{cnum}];
<wait> exported = pauses (0 |{cnum});
<auto> exported = stack automatically;

Programming notes:

  • a little bit pausing has to be done after all the dragging commands, so the minimum waiting time is 0.05 sec.
  • this grammar is an exercise in mouse moving and dragging.