@Alan - your EngControl version works except…
Sub Main
Dim EngControl As New DgnEngineControl
Dim x As String
Let x = "select " & ListVar2
EngControl.Register
EngControl.RecognitionMimic (x)
EngControl.UnRegister (False)
Wait 3
SendKeys "{Esc}", 1
Wait 0.5
Select Case ListVar1
Case "Normal", "Regular", "Regularize", "Normalize"
SendKeys "^n", 1
Case "Strikethrough", "Strike Out", "Strikeout"
SendKeys "^s", 1
End Select
End Sub
Even if I make the delay much longer than 3 seconds (3 seconds would be intolerable anyway) the Select Case code processes before the selection is made. I can see the result of the ‘SendKeys "^s", 1’ statement briefly (the Strikethrough icon toggles for three seconds). It would appear that the ‘EngControl.RecognitionMimic’ is not exercised until the command exits.
-------------------------
-Edgar
DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors