Can now execute chain of menu commands when a link is selected
This commit is contained in:
parent
593c5514b3
commit
bc435314d5
|
@ -164,7 +164,7 @@ Var
|
||||||
Keyword : String;
|
Keyword : String;
|
||||||
TopPage : Integer;
|
TopPage : Integer;
|
||||||
CurLine : Integer;
|
CurLine : Integer;
|
||||||
CurLPos : Byte;
|
CurLPos : Byte = 1;
|
||||||
WinSize : Integer;
|
WinSize : Integer;
|
||||||
LastPos : Byte;
|
LastPos : Byte;
|
||||||
LastKey : Array[1..10] of String[mysMaxHelpKeyLen];
|
LastKey : Array[1..10] of String[mysMaxHelpKeyLen];
|
||||||
|
@ -246,6 +246,33 @@ Var
|
||||||
WinY2 := Session.io.SCreenInfo[2].Y;
|
WinY2 := Session.io.SCreenInfo[2].Y;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
Procedure ExecuteMenuCommands;
|
||||||
|
Var
|
||||||
|
Key : String;
|
||||||
|
Temp : String;
|
||||||
|
Cmd : String[2];
|
||||||
|
Data : String;
|
||||||
|
Begin
|
||||||
|
Session.io.AnsiColor(7);
|
||||||
|
|
||||||
|
Key := Text[TopPage + CurLine - 1].Link[CurLPos].Key;
|
||||||
|
|
||||||
|
Repeat
|
||||||
|
Delete (Key, 1, 1);
|
||||||
|
|
||||||
|
Temp := strWordGet(1, Key, ']');
|
||||||
|
|
||||||
|
Cmd := strWordGet(1, Temp, ';');
|
||||||
|
Data := strWordGet(2, Temp, ';');
|
||||||
|
|
||||||
|
Delete (Key, 1, Length(Temp) + 1);
|
||||||
|
|
||||||
|
Session.Menu.ExecuteCommand (Cmd, Data);
|
||||||
|
Until Key = '';
|
||||||
|
|
||||||
|
ShowTemplate;
|
||||||
|
End;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
OK : Boolean;
|
OK : Boolean;
|
||||||
Count : Byte;
|
Count : Byte;
|
||||||
|
@ -436,6 +463,7 @@ Begin
|
||||||
|
|
||||||
ShowTemplate;
|
ShowTemplate;
|
||||||
End;
|
End;
|
||||||
|
'[' : ExecuteMenuCommands;
|
||||||
Else
|
Else
|
||||||
If LastPos < 10 Then
|
If LastPos < 10 Then
|
||||||
Inc (LastPos)
|
Inc (LastPos)
|
||||||
|
|
Loading…
Reference in New Issue