From 86219ba14e65da26bf6c1f6fdbdb2f5dbc94f36d Mon Sep 17 00:00:00 2001 From: Charles Edwards Date: Mon, 5 Mar 2018 10:53:03 -0500 Subject: [PATCH 1/5] My solution using TestComplete and JavaScript --- Keyboard.txt | 28 ++++++++++++++++++++++++++++ SearchTerm.txt | 28 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 Keyboard.txt create mode 100644 SearchTerm.txt diff --git a/Keyboard.txt b/Keyboard.txt new file mode 100644 index 0000000..f188268 --- /dev/null +++ b/Keyboard.txt @@ -0,0 +1,28 @@ +D,R,R,#,D,D,L,#,S,U,U,U,R,#,D,D,R,R,R,#,L,L,L,#,D,R,R,#,U,U,U,L,# +#,R,#,R,#,R,#,R,#,R,#,S,D,L,L,L,L,L,#,R,#,R,#,R,#,R,#,R,#,S,D,L,L,L,L,L,#,R,#,R,#,R,#,R,#,R,#,S,D,L,L,L,L,L,#,R,#,R,#,R,#,R,#,R,#,S,D,L,L,L,L,L,#,R,#,R,#,R,#,R,#,R,#,S,D,L,L,L,L,L,#,R,#,R,#,R,#,R,#,R,# +#,# +#,R,# +#,R,R,# +#,R,R,R,# +#,R,R,R,R,# +#,R,R,R,R,R,# +#,D,# +#,D,R,# +#,D,R,R,# +#,D,R,R,R,# +#,D,R,R,R,R,# +#,D,R,R,R,R,R,# +#,D,D,# +#,D,D,R,# +#,D,D,R,R,# +#,D,D,R,R,R,# +#,D,D,R,R,R,R,# +#,D,D,R,R,R,R,R,# +#,D,D,D,# +#,D,D,D,R,# +#,D,D,D,R,R,# +#,D,D,D,R,R,R,# +#,D,D,D,R,R,R,R,# +#,D,D,D,R,R,R,R,R,# +#,D,D,D,D,# +#,D,D,D,D,R,# diff --git a/SearchTerm.txt b/SearchTerm.txt new file mode 100644 index 0000000..f44d3b6 --- /dev/null +++ b/SearchTerm.txt @@ -0,0 +1,28 @@ +IT Crowd +abcdef ghijkl mnopqr stuvwx yz1234 567890 +AA +AB +AC +AD +AE +AF +AG +AH +AI +AJ +AK +AL +AM +AN +AO +AP +AQ +AR +AS +AT +AU +AV +AW +AX +AY +AZ From 80fad0db9492795bbfd226bd183442ab6ecc1559 Mon Sep 17 00:00:00 2001 From: Charles Edwards Date: Mon, 5 Mar 2018 10:53:53 -0500 Subject: [PATCH 2/5] My solution using TestComplete and JavaScript --- TestProject1/CBT.data | 9 +++++++ .../Log/TestProject1.pjs.EnvMngr.tcLogs | 27 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 TestProject1/CBT.data create mode 100644 TestProject1/Log/TestProject1.pjs.EnvMngr.tcLogs diff --git a/TestProject1/CBT.data b/TestProject1/CBT.data new file mode 100644 index 0000000..f71c566 --- /dev/null +++ b/TestProject1/CBT.data @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/TestProject1/Log/TestProject1.pjs.EnvMngr.tcLogs b/TestProject1/Log/TestProject1.pjs.EnvMngr.tcLogs new file mode 100644 index 0000000..eb08511 --- /dev/null +++ b/TestProject1/Log/TestProject1.pjs.EnvMngr.tcLogs @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + \ No newline at end of file From d15afc1e669d4ff2585a16f6a8ea1bc22aeff088 Mon Sep 17 00:00:00 2001 From: Charles Edwards Date: Mon, 5 Mar 2018 10:54:44 -0500 Subject: [PATCH 3/5] My Solution using TestComplete and JavaScript --- TestProject1/Log/TestProject1.pjs.tcLogs | 27 + TestProject1/TestProject1.pjs | 22 + TestProject1/TestProject1.pjs.tcLS | 40 + TestProject1/TestProject1.tcCfgExtender | 201 ++ .../KeywordTests/KeywordTests.tcKDT | 9 + .../TestProject1/KeywordTests/Test1.tcKDTest | 12 + .../Test1_tcKDTest/Test1.tcKDTest.tcVis | 4 + .../3_5_2018_9_26 AM_14_990/Description.tcLog | 38 + .../3_5_2018_9_26 AM_14_990/RootLogData.dat | 56 + .../{0C179907-7D4B-4EAA-B900-1D05FBD43674} | 1997 +++++++++++++++++ .../3_5_2018_9_27 AM_59_367/Description.tcLog | 38 + .../3_5_2018_9_27 AM_59_367/RootLogData.dat | 56 + .../{6160A909-3B4C-4F22-BD49-FF72A0A67D3A} | 1997 +++++++++++++++++ .../TestProject1/Log/TestProject1.mds.tcLogs | 46 + .../TestProject1/NameMapping/NameMapping.tcNM | 9 + .../TestProject1/Script/Script.tcScript | 9 + .../Visualizer/cae_OSK_js/cae_OSK.js.tcVis | 4 + TestProject1/TestProject1/Script/cae_OSK.js | 108 + .../TestProject1/Script/cae_OSK.js.bak | 107 + .../TestProject1/Stores/Files.tcFiles | 5 + .../TestProject1/Stores/Files/SearchTerm.txt | 1 + .../TestProject1/Stores/Stores.tcStores | 9 + TestProject1/TestProject1/TestProject1.mds | 518 +++++ .../TestProject1/TestProject1.mds.tcLS | 31 + .../TestProject1/TestedApps/TestedApps.tcTAs | 8 + 25 files changed, 5352 insertions(+) create mode 100644 TestProject1/Log/TestProject1.pjs.tcLogs create mode 100644 TestProject1/TestProject1.pjs create mode 100644 TestProject1/TestProject1.pjs.tcLS create mode 100644 TestProject1/TestProject1.tcCfgExtender create mode 100644 TestProject1/TestProject1/KeywordTests/KeywordTests.tcKDT create mode 100644 TestProject1/TestProject1/KeywordTests/Test1.tcKDTest create mode 100644 TestProject1/TestProject1/KeywordTests/Visualizer/Test1_tcKDTest/Test1.tcKDTest.tcVis create mode 100644 TestProject1/TestProject1/Log/3_5_2018_9_26 AM_14_990/Description.tcLog create mode 100644 TestProject1/TestProject1/Log/3_5_2018_9_26 AM_14_990/RootLogData.dat create mode 100644 TestProject1/TestProject1/Log/3_5_2018_9_26 AM_14_990/{0C179907-7D4B-4EAA-B900-1D05FBD43674} create mode 100644 TestProject1/TestProject1/Log/3_5_2018_9_27 AM_59_367/Description.tcLog create mode 100644 TestProject1/TestProject1/Log/3_5_2018_9_27 AM_59_367/RootLogData.dat create mode 100644 TestProject1/TestProject1/Log/3_5_2018_9_27 AM_59_367/{6160A909-3B4C-4F22-BD49-FF72A0A67D3A} create mode 100644 TestProject1/TestProject1/Log/TestProject1.mds.tcLogs create mode 100644 TestProject1/TestProject1/NameMapping/NameMapping.tcNM create mode 100644 TestProject1/TestProject1/Script/Script.tcScript create mode 100644 TestProject1/TestProject1/Script/Visualizer/cae_OSK_js/cae_OSK.js.tcVis create mode 100644 TestProject1/TestProject1/Script/cae_OSK.js create mode 100644 TestProject1/TestProject1/Script/cae_OSK.js.bak create mode 100644 TestProject1/TestProject1/Stores/Files.tcFiles create mode 100644 TestProject1/TestProject1/Stores/Files/SearchTerm.txt create mode 100644 TestProject1/TestProject1/Stores/Stores.tcStores create mode 100644 TestProject1/TestProject1/TestProject1.mds create mode 100644 TestProject1/TestProject1/TestProject1.mds.tcLS create mode 100644 TestProject1/TestProject1/TestedApps/TestedApps.tcTAs diff --git a/TestProject1/Log/TestProject1.pjs.tcLogs b/TestProject1/Log/TestProject1.pjs.tcLogs new file mode 100644 index 0000000..6774593 --- /dev/null +++ b/TestProject1/Log/TestProject1.pjs.tcLogs @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1.pjs b/TestProject1/TestProject1.pjs new file mode 100644 index 0000000..2e13fc9 --- /dev/null +++ b/TestProject1/TestProject1.pjs @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/TestProject1/TestProject1.pjs.tcLS b/TestProject1/TestProject1.pjs.tcLS new file mode 100644 index 0000000..1d1331c --- /dev/null +++ b/TestProject1/TestProject1.pjs.tcLS @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1.tcCfgExtender b/TestProject1/TestProject1.tcCfgExtender new file mode 100644 index 0000000..b9758e3 --- /dev/null +++ b/TestProject1/TestProject1.tcCfgExtender @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/KeywordTests/KeywordTests.tcKDT b/TestProject1/TestProject1/KeywordTests/KeywordTests.tcKDT new file mode 100644 index 0000000..88bada4 --- /dev/null +++ b/TestProject1/TestProject1/KeywordTests/KeywordTests.tcKDT @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/TestProject1/TestProject1/KeywordTests/Test1.tcKDTest b/TestProject1/TestProject1/KeywordTests/Test1.tcKDTest new file mode 100644 index 0000000..82ed72e --- /dev/null +++ b/TestProject1/TestProject1/KeywordTests/Test1.tcKDTest @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/TestProject1/TestProject1/KeywordTests/Visualizer/Test1_tcKDTest/Test1.tcKDTest.tcVis b/TestProject1/TestProject1/KeywordTests/Visualizer/Test1_tcKDTest/Test1.tcKDTest.tcVis new file mode 100644 index 0000000..2f6422d --- /dev/null +++ b/TestProject1/TestProject1/KeywordTests/Visualizer/Test1_tcKDTest/Test1.tcKDTest.tcVis @@ -0,0 +1,4 @@ + + + + diff --git a/TestProject1/TestProject1/Log/3_5_2018_9_26 AM_14_990/Description.tcLog b/TestProject1/TestProject1/Log/3_5_2018_9_26 AM_14_990/Description.tcLog new file mode 100644 index 0000000..ef85e51 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_5_2018_9_26 AM_14_990/Description.tcLog @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_5_2018_9_26 AM_14_990/RootLogData.dat b/TestProject1/TestProject1/Log/3_5_2018_9_26 AM_14_990/RootLogData.dat new file mode 100644 index 0000000..a2f1e2c --- /dev/null +++ b/TestProject1/TestProject1/Log/3_5_2018_9_26 AM_14_990/RootLogData.dat @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_5_2018_9_26 AM_14_990/{0C179907-7D4B-4EAA-B900-1D05FBD43674} b/TestProject1/TestProject1/Log/3_5_2018_9_26 AM_14_990/{0C179907-7D4B-4EAA-B900-1D05FBD43674} new file mode 100644 index 0000000..2ef1fb7 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_5_2018_9_26 AM_14_990/{0C179907-7D4B-4EAA-B900-1D05FBD43674} @@ -0,0 +1,1997 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_5_2018_9_27 AM_59_367/Description.tcLog b/TestProject1/TestProject1/Log/3_5_2018_9_27 AM_59_367/Description.tcLog new file mode 100644 index 0000000..f896cb6 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_5_2018_9_27 AM_59_367/Description.tcLog @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_5_2018_9_27 AM_59_367/RootLogData.dat b/TestProject1/TestProject1/Log/3_5_2018_9_27 AM_59_367/RootLogData.dat new file mode 100644 index 0000000..d2f56ab --- /dev/null +++ b/TestProject1/TestProject1/Log/3_5_2018_9_27 AM_59_367/RootLogData.dat @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_5_2018_9_27 AM_59_367/{6160A909-3B4C-4F22-BD49-FF72A0A67D3A} b/TestProject1/TestProject1/Log/3_5_2018_9_27 AM_59_367/{6160A909-3B4C-4F22-BD49-FF72A0A67D3A} new file mode 100644 index 0000000..626db30 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_5_2018_9_27 AM_59_367/{6160A909-3B4C-4F22-BD49-FF72A0A67D3A} @@ -0,0 +1,1997 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/TestProject1.mds.tcLogs b/TestProject1/TestProject1/Log/TestProject1.mds.tcLogs new file mode 100644 index 0000000..b66d659 --- /dev/null +++ b/TestProject1/TestProject1/Log/TestProject1.mds.tcLogs @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/NameMapping/NameMapping.tcNM b/TestProject1/TestProject1/NameMapping/NameMapping.tcNM new file mode 100644 index 0000000..a88b6ea --- /dev/null +++ b/TestProject1/TestProject1/NameMapping/NameMapping.tcNM @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/TestProject1/TestProject1/Script/Script.tcScript b/TestProject1/TestProject1/Script/Script.tcScript new file mode 100644 index 0000000..a53c61a --- /dev/null +++ b/TestProject1/TestProject1/Script/Script.tcScript @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/TestProject1/TestProject1/Script/Visualizer/cae_OSK_js/cae_OSK.js.tcVis b/TestProject1/TestProject1/Script/Visualizer/cae_OSK_js/cae_OSK.js.tcVis new file mode 100644 index 0000000..ac52407 --- /dev/null +++ b/TestProject1/TestProject1/Script/Visualizer/cae_OSK_js/cae_OSK.js.tcVis @@ -0,0 +1,4 @@ + + + + diff --git a/TestProject1/TestProject1/Script/cae_OSK.js b/TestProject1/TestProject1/Script/cae_OSK.js new file mode 100644 index 0000000..a21b11d --- /dev/null +++ b/TestProject1/TestProject1/Script/cae_OSK.js @@ -0,0 +1,108 @@ +function calcMoves(letter, old_x, old_y, new_x, new_y) +{ var LeftRight = UpDown = 0; + var move_str = '', space = ' ', LR = 'L,', UD = 'U,', Hash = '#,'; + switch (letter) + { + case space: + move_str = 'S,'; + break; + default: + LeftRight = new_x - old_x; + UpDown = new_y - old_y; + if(LeftRight < 0) LR = 'L,' + else LR = 'R,'; + if(UpDown < 0) UD = 'U,' + else UD = 'D,' + count = Math.abs(UpDown); + while (count > 0) + { + move_str = move_str + UD; + count--; + } + count = Math.abs(LeftRight); + while (count > 0) + { + move_str = move_str + LR; + count--; + } + move_str = move_str + Hash; + } + return move_str; +} + +function getSearchTerm(SearchTerm) +//retrieves a line from the file of Search Terms to be translated into cursor movements +//convert line to all upper case +//retrun the line to the calling program +{ + //var SearchTerm = 'IT Crowd'; + //var SearchTerm = 'abcdef ghijkl mnopqr stuvwx yz1234 567890'; + SearchTerm = SearchTerm.toUpperCase(); + return SearchTerm; +} + +function main() +{ + var keyboard = [ + ["A","B","C","D","E","F"], + ["G","H","I","J","K","L"], + ["M","N","O","P","Q","R"], + ["S","T","U","V","W","X"], + ["Y","Z","1","2","3","4"], + ["5","6","7","8","9","0"] + ]; + + var inPath = "D:\\Source\\SearchTerm.txt"; + var outPath = "D:\\Source\\Keyboard.txt"; + + // TestComplete function- opens the specified file for reading/writing + var inFile = aqFile.OpenTextFile(inPath, aqFile.faRead, aqFile.ctUTF8); + var outFile = aqFile.OpenTextFile(outPath, aqFile.faWrite, aqFile.ctANSI, true); + + var current_x, new_x, move_x, index_x, current_y, new_y, move_y, index_y; + var cursor_str; + var SearchTerm; + + while(! inFile.IsEndOfFile()){ + SearchTerm = inFile.ReadLine(); + SearchTerm = getSearchTerm(SearchTerm); + current_x = current_y = 0; + cursor_str = ""; + for (var i = 0; i < SearchTerm.length; i++) + { + index_x = index_y = 0; + + switch (SearchTerm.charAt(i)){ + case " ": + cursor_str = cursor_str + calcMoves(SearchTerm.charAt(i), current_x, current_y, new_x, new_y); + break; + default: + while (SearchTerm.charAt(i) != keyboard[index_y][index_x]) + { + ++index_x + if (index_x > 5) + { + index_x=0 + ++index_y + } + } + if (SearchTerm.charAt(i) == keyboard[index_y][index_x]) + { + Log.Message('Match Found SearchChar = ' + SearchTerm.charAt(i) + ' @index (y, x) (' + index_y + ', ' + index_x + ')') + } + new_x = index_x; + new_y = index_y; + cursor_str = cursor_str + calcMoves(SearchTerm.charAt(i), current_x, current_y, new_x, new_y); + current_x = new_x; + current_y = new_y; + } + } + Log.Message(SearchTerm + " " + cursor_str); + //wacks of an unecessary ',' at the end of the string + cursor_str = cursor_str.substring(0, cursor_str.length - 1); + cursor_str = cursor_str + "\r\n"; + outFile.Write(cursor_str); + } + inFile.Close(); + outFile.Close(); +} \ No newline at end of file diff --git a/TestProject1/TestProject1/Script/cae_OSK.js.bak b/TestProject1/TestProject1/Script/cae_OSK.js.bak new file mode 100644 index 0000000..cd42a31 --- /dev/null +++ b/TestProject1/TestProject1/Script/cae_OSK.js.bak @@ -0,0 +1,107 @@ +function calcMoves(letter, old_x, old_y, new_x, new_y) +{ var LeftRight = UpDown = 0; + var move_str = '', space = ' ', LR = 'L,', UD = 'U,', Hash = '#,'; + switch (letter) + { + case space: + move_str = 'S,'; + break; + default: + LeftRight = new_x - old_x; + UpDown = new_y - old_y; + if(LeftRight < 0) LR = 'L,' + else LR = 'R,'; + if(UpDown < 0) UD = 'U,' + else UD = 'D,' + count = Math.abs(UpDown); + while (count > 0) + { + move_str = move_str + UD; + count--; + } + count = Math.abs(LeftRight); + while (count > 0) + { + move_str = move_str + LR; + count--; + } + move_str = move_str + Hash; + } + return move_str; +} + +function getSearchTerm(SearchTerm) +//retrieves a line from the file of Search Terms to be translated into cursor movements +//convert line to all upper case +//retrun the line to the calling program +{ + //var SearchTerm = 'IT Crowd'; + //var SearchTerm = 'abcdef ghijkl mnopqr stuvwx yz1234 567890'; + SearchTerm = SearchTerm.toUpperCase(); + return SearchTerm; +} + +function main() +{ + var keyboard = [ + ["A","B","C","D","E","F"], + ["G","H","I","J","K","L"], + ["M","N","O","P","Q","R"], + ["S","T","U","V","W","X"], + ["Y","Z","1","2","3","4"], + ["5","6","7","8","9","0"] + ]; + + var inPath = "D:\\Source\\SearchTerm.txt"; + var outPath = "D:\\Source\\Keyboard.txt"; + + // TestComplete function- opens the specified file for reading/writing + var inFile = aqFile.OpenTextFile(inPath, aqFile.faRead, aqFile.ctUTF8); + var outFile = aqFile.OpenTextFile(outPath, aqFile.faWrite, aqFile.ctANSI, true); + + var current_x, new_x, move_x, index_x, current_y, new_y, move_y, index_y; + var cursor_str; + var SearchTerm; + + while(! inFile.IsEndOfFile()){ + SearchTerm = inFile.ReadLine(); + SearchTerm = getSearchTerm(SearchTerm); + current_x = current_y = 0; + cursor_str = ""; + for (var i = 0; i < SearchTerm.length; i++) + { + index_x = index_y = 0; + + switch (SearchTerm.charAt(i)){ + case " ": + cursor_str = cursor_str + calcMoves(SearchTerm.charAt(i), current_x, current_y, new_x, new_y); + break; + default: + while (SearchTerm.charAt(i) != keyboard[index_y][index_x]) + { + ++index_x + if (index_x > 5) + { + index_x=0 + ++index_y + } + } + if (SearchTerm.charAt(i) == keyboard[index_y][index_x]) + { + Log.Message('Match Found SearchChar = ' + SearchTerm.charAt(i) + ' @index (y, x) (' + index_y + ', ' + index_x + ')') + } + new_x = index_x; + new_y = index_y; + cursor_str = cursor_str + calcMoves(SearchTerm.charAt(i), current_x, current_y, new_x, new_y); + current_x = new_x; + current_y = new_y; + } + } + Log.Message(SearchTerm + " " + cursor_str); + cursor_str = cursor_str.substring(0, cursor_str.length - 1); + cursor_str = cursor_str + "\r\n"; + outFile.Write(cursor_str); + } + inFile.Close(); + outFile.Close(); +} \ No newline at end of file diff --git a/TestProject1/TestProject1/Stores/Files.tcFiles b/TestProject1/TestProject1/Stores/Files.tcFiles new file mode 100644 index 0000000..ff5793c --- /dev/null +++ b/TestProject1/TestProject1/Stores/Files.tcFiles @@ -0,0 +1,5 @@ + + + + + diff --git a/TestProject1/TestProject1/Stores/Files/SearchTerm.txt b/TestProject1/TestProject1/Stores/Files/SearchTerm.txt new file mode 100644 index 0000000..f760f7d --- /dev/null +++ b/TestProject1/TestProject1/Stores/Files/SearchTerm.txt @@ -0,0 +1 @@ +IT Crowd \ No newline at end of file diff --git a/TestProject1/TestProject1/Stores/Stores.tcStores b/TestProject1/TestProject1/Stores/Stores.tcStores new file mode 100644 index 0000000..c394537 --- /dev/null +++ b/TestProject1/TestProject1/Stores/Stores.tcStores @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/TestProject1/TestProject1/TestProject1.mds b/TestProject1/TestProject1/TestProject1.mds new file mode 100644 index 0000000..aa41f21 --- /dev/null +++ b/TestProject1/TestProject1/TestProject1.mds @@ -0,0 +1,518 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TestProject1/TestProject1/TestProject1.mds.tcLS b/TestProject1/TestProject1/TestProject1.mds.tcLS new file mode 100644 index 0000000..16368db --- /dev/null +++ b/TestProject1/TestProject1/TestProject1.mds.tcLS @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/TestedApps/TestedApps.tcTAs b/TestProject1/TestProject1/TestedApps/TestedApps.tcTAs new file mode 100644 index 0000000..53f1124 --- /dev/null +++ b/TestProject1/TestProject1/TestedApps/TestedApps.tcTAs @@ -0,0 +1,8 @@ + + + + + + + + From 0058f8b32419f0ae54fb94da2b1a69d258f5c142 Mon Sep 17 00:00:00 2001 From: Charles Edwards Date: Tue, 6 Mar 2018 19:48:33 -0500 Subject: [PATCH 4/5] final commit prior to Pull Request --- Keyboard.txt | 11 + ReasdMeFirst.txt | 14 + SearchTerm.txt | 11 + TestProject1/TestProject1.tcCfgExtender | 85 +- .../3_6_2018_6_50 PM_00_348/Description.tcLog | 38 + .../3_6_2018_6_50 PM_00_348/RootLogData.dat | 56 + .../{B1F8925A-09C5-479B-B50F-0F98BBEA3F10} | 1997 +++++++++++++++++ .../3_6_2018_6_54 PM_02_424/Description.tcLog | 38 + .../3_6_2018_6_54 PM_02_424/RootLogData.dat | 56 + .../{9B5E655A-6DBD-46F2-A95E-C856FC68E709} | 1997 +++++++++++++++++ .../3_6_2018_7_10 PM_41_779/Description.tcLog | 38 + .../3_6_2018_7_10 PM_41_779/RootLogData.dat | 56 + .../{757C1A36-B438-4BA9-A4FE-604A50608562} | 27 + .../3_6_2018_7_12 PM_54_206/Description.tcLog | 38 + .../3_6_2018_7_12 PM_54_206/RootLogData.dat | 56 + .../{A340FF07-91B6-49D1-A87B-BBD6DC0B651C} | 27 + .../3_6_2018_7_15 PM_03_65/Description.tcLog | 38 + .../3_6_2018_7_15 PM_03_65/RootLogData.dat | 56 + .../{6BE4ACB5-39FB-4E68-ABC3-849455560818} | 27 + .../3_6_2018_7_19 PM_34_113/Description.tcLog | 38 + .../3_6_2018_7_19 PM_34_113/RootLogData.dat | 56 + .../{76C12EED-3FAA-41BD-95DE-B58368CF5E9C} | 653 ++++++ .../TestProject1/Log/TestProject1.mds.tcLogs | 54 + TestProject1/TestProject1/Script/cae_OSK.js | 68 +- .../TestProject1/Script/cae_OSK.js.bak | 60 +- 25 files changed, 5511 insertions(+), 84 deletions(-) create mode 100644 ReasdMeFirst.txt create mode 100644 TestProject1/TestProject1/Log/3_6_2018_6_50 PM_00_348/Description.tcLog create mode 100644 TestProject1/TestProject1/Log/3_6_2018_6_50 PM_00_348/RootLogData.dat create mode 100644 TestProject1/TestProject1/Log/3_6_2018_6_50 PM_00_348/{B1F8925A-09C5-479B-B50F-0F98BBEA3F10} create mode 100644 TestProject1/TestProject1/Log/3_6_2018_6_54 PM_02_424/Description.tcLog create mode 100644 TestProject1/TestProject1/Log/3_6_2018_6_54 PM_02_424/RootLogData.dat create mode 100644 TestProject1/TestProject1/Log/3_6_2018_6_54 PM_02_424/{9B5E655A-6DBD-46F2-A95E-C856FC68E709} create mode 100644 TestProject1/TestProject1/Log/3_6_2018_7_10 PM_41_779/Description.tcLog create mode 100644 TestProject1/TestProject1/Log/3_6_2018_7_10 PM_41_779/RootLogData.dat create mode 100644 TestProject1/TestProject1/Log/3_6_2018_7_10 PM_41_779/{757C1A36-B438-4BA9-A4FE-604A50608562} create mode 100644 TestProject1/TestProject1/Log/3_6_2018_7_12 PM_54_206/Description.tcLog create mode 100644 TestProject1/TestProject1/Log/3_6_2018_7_12 PM_54_206/RootLogData.dat create mode 100644 TestProject1/TestProject1/Log/3_6_2018_7_12 PM_54_206/{A340FF07-91B6-49D1-A87B-BBD6DC0B651C} create mode 100644 TestProject1/TestProject1/Log/3_6_2018_7_15 PM_03_65/Description.tcLog create mode 100644 TestProject1/TestProject1/Log/3_6_2018_7_15 PM_03_65/RootLogData.dat create mode 100644 TestProject1/TestProject1/Log/3_6_2018_7_15 PM_03_65/{6BE4ACB5-39FB-4E68-ABC3-849455560818} create mode 100644 TestProject1/TestProject1/Log/3_6_2018_7_19 PM_34_113/Description.tcLog create mode 100644 TestProject1/TestProject1/Log/3_6_2018_7_19 PM_34_113/RootLogData.dat create mode 100644 TestProject1/TestProject1/Log/3_6_2018_7_19 PM_34_113/{76C12EED-3FAA-41BD-95DE-B58368CF5E9C} diff --git a/Keyboard.txt b/Keyboard.txt index f188268..f7c1eaf 100644 --- a/Keyboard.txt +++ b/Keyboard.txt @@ -26,3 +26,14 @@ D,R,R,#,D,D,L,#,S,U,U,U,R,#,D,D,R,R,R,#,L,L,L,#,D,R,R,#,U,U,U,L,# #,D,D,D,R,R,R,R,R,# #,D,D,D,D,# #,D,D,D,D,R,# +#,D,D,D,D,R,R,# +#,D,D,D,D,R,R,R,# +#,D,D,D,D,R,R,R,R,# +#,D,D,D,D,R,R,R,R,R,# +#,D,D,D,D,D,# +#,D,D,D,D,D,R,# +#,D,D,D,D,D,R,R,# +#,D,D,D,D,D,R,R,R,# +#,D,D,D,D,D,R,R,R,R,# +#,D,D,D,D,D,R,R,R,R,R,# + diff --git a/ReasdMeFirst.txt b/ReasdMeFirst.txt new file mode 100644 index 0000000..9194530 --- /dev/null +++ b/ReasdMeFirst.txt @@ -0,0 +1,14 @@ +Solution was written using the TestComplete IDE and JavaScript code. +The JavaScript can be found in ..\cae_OnScreenKeyboard\TestProject1\TestProject1\Script + +I used this approach because this has been the dev environment I have used for the last 7+ years to develop automated test frameworks. + +The solution I came up with is reasonably straightforward but unfortunately cannot be run in a browser that supports JavaScript because I am using I/O functions inherent in the TestComplete scripting engine. + +If you wish to run the solution, a TestComplete trial can be downloaded for free. +To open the project, navigate to cae_OnScreenKeyboard\TestProject1 and select the TestProject1.pjs file +Then navigate to the script folder to run it. + +Thank you, + +Charles \ No newline at end of file diff --git a/SearchTerm.txt b/SearchTerm.txt index f44d3b6..20e2ed3 100644 --- a/SearchTerm.txt +++ b/SearchTerm.txt @@ -26,3 +26,14 @@ AW AX AY AZ +A1 +A2 +A3 +A4 +A5 +A6 +A7 +A8 +A9 +A0 + diff --git a/TestProject1/TestProject1.tcCfgExtender b/TestProject1/TestProject1.tcCfgExtender index b9758e3..54de67c 100644 --- a/TestProject1/TestProject1.tcCfgExtender +++ b/TestProject1/TestProject1.tcCfgExtender @@ -25,52 +25,48 @@ - - - - - - + + - - - - - - - - - - - + - - - - - + + + + + - + + + + + + + + + + + - - + + - + @@ -140,31 +136,46 @@ - + + + + + + - + - - - - - - + - + - + + + + + + + + + + + + + + + + - + diff --git a/TestProject1/TestProject1/Log/3_6_2018_6_50 PM_00_348/Description.tcLog b/TestProject1/TestProject1/Log/3_6_2018_6_50 PM_00_348/Description.tcLog new file mode 100644 index 0000000..9c26049 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_6_50 PM_00_348/Description.tcLog @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_6_2018_6_50 PM_00_348/RootLogData.dat b/TestProject1/TestProject1/Log/3_6_2018_6_50 PM_00_348/RootLogData.dat new file mode 100644 index 0000000..4a44f53 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_6_50 PM_00_348/RootLogData.dat @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_6_2018_6_50 PM_00_348/{B1F8925A-09C5-479B-B50F-0F98BBEA3F10} b/TestProject1/TestProject1/Log/3_6_2018_6_50 PM_00_348/{B1F8925A-09C5-479B-B50F-0F98BBEA3F10} new file mode 100644 index 0000000..0af1e54 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_6_50 PM_00_348/{B1F8925A-09C5-479B-B50F-0F98BBEA3F10} @@ -0,0 +1,1997 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_6_2018_6_54 PM_02_424/Description.tcLog b/TestProject1/TestProject1/Log/3_6_2018_6_54 PM_02_424/Description.tcLog new file mode 100644 index 0000000..aea456f --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_6_54 PM_02_424/Description.tcLog @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_6_2018_6_54 PM_02_424/RootLogData.dat b/TestProject1/TestProject1/Log/3_6_2018_6_54 PM_02_424/RootLogData.dat new file mode 100644 index 0000000..460eaf8 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_6_54 PM_02_424/RootLogData.dat @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_6_2018_6_54 PM_02_424/{9B5E655A-6DBD-46F2-A95E-C856FC68E709} b/TestProject1/TestProject1/Log/3_6_2018_6_54 PM_02_424/{9B5E655A-6DBD-46F2-A95E-C856FC68E709} new file mode 100644 index 0000000..e8b7781 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_6_54 PM_02_424/{9B5E655A-6DBD-46F2-A95E-C856FC68E709} @@ -0,0 +1,1997 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_6_2018_7_10 PM_41_779/Description.tcLog b/TestProject1/TestProject1/Log/3_6_2018_7_10 PM_41_779/Description.tcLog new file mode 100644 index 0000000..923d43e --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_7_10 PM_41_779/Description.tcLog @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_6_2018_7_10 PM_41_779/RootLogData.dat b/TestProject1/TestProject1/Log/3_6_2018_7_10 PM_41_779/RootLogData.dat new file mode 100644 index 0000000..e6e0a00 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_7_10 PM_41_779/RootLogData.dat @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_6_2018_7_10 PM_41_779/{757C1A36-B438-4BA9-A4FE-604A50608562} b/TestProject1/TestProject1/Log/3_6_2018_7_10 PM_41_779/{757C1A36-B438-4BA9-A4FE-604A50608562} new file mode 100644 index 0000000..8171261 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_7_10 PM_41_779/{757C1A36-B438-4BA9-A4FE-604A50608562} @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_6_2018_7_12 PM_54_206/Description.tcLog b/TestProject1/TestProject1/Log/3_6_2018_7_12 PM_54_206/Description.tcLog new file mode 100644 index 0000000..124e537 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_7_12 PM_54_206/Description.tcLog @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_6_2018_7_12 PM_54_206/RootLogData.dat b/TestProject1/TestProject1/Log/3_6_2018_7_12 PM_54_206/RootLogData.dat new file mode 100644 index 0000000..28889a3 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_7_12 PM_54_206/RootLogData.dat @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_6_2018_7_12 PM_54_206/{A340FF07-91B6-49D1-A87B-BBD6DC0B651C} b/TestProject1/TestProject1/Log/3_6_2018_7_12 PM_54_206/{A340FF07-91B6-49D1-A87B-BBD6DC0B651C} new file mode 100644 index 0000000..1e266d8 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_7_12 PM_54_206/{A340FF07-91B6-49D1-A87B-BBD6DC0B651C} @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_6_2018_7_15 PM_03_65/Description.tcLog b/TestProject1/TestProject1/Log/3_6_2018_7_15 PM_03_65/Description.tcLog new file mode 100644 index 0000000..d29a324 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_7_15 PM_03_65/Description.tcLog @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_6_2018_7_15 PM_03_65/RootLogData.dat b/TestProject1/TestProject1/Log/3_6_2018_7_15 PM_03_65/RootLogData.dat new file mode 100644 index 0000000..a6348a6 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_7_15 PM_03_65/RootLogData.dat @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_6_2018_7_15 PM_03_65/{6BE4ACB5-39FB-4E68-ABC3-849455560818} b/TestProject1/TestProject1/Log/3_6_2018_7_15 PM_03_65/{6BE4ACB5-39FB-4E68-ABC3-849455560818} new file mode 100644 index 0000000..5a13556 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_7_15 PM_03_65/{6BE4ACB5-39FB-4E68-ABC3-849455560818} @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_6_2018_7_19 PM_34_113/Description.tcLog b/TestProject1/TestProject1/Log/3_6_2018_7_19 PM_34_113/Description.tcLog new file mode 100644 index 0000000..16edf46 --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_7_19 PM_34_113/Description.tcLog @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_6_2018_7_19 PM_34_113/RootLogData.dat b/TestProject1/TestProject1/Log/3_6_2018_7_19 PM_34_113/RootLogData.dat new file mode 100644 index 0000000..d20286d --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_7_19 PM_34_113/RootLogData.dat @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/3_6_2018_7_19 PM_34_113/{76C12EED-3FAA-41BD-95DE-B58368CF5E9C} b/TestProject1/TestProject1/Log/3_6_2018_7_19 PM_34_113/{76C12EED-3FAA-41BD-95DE-B58368CF5E9C} new file mode 100644 index 0000000..b1a24af --- /dev/null +++ b/TestProject1/TestProject1/Log/3_6_2018_7_19 PM_34_113/{76C12EED-3FAA-41BD-95DE-B58368CF5E9C} @@ -0,0 +1,653 @@ + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestProject1/TestProject1/Log/TestProject1.mds.tcLogs b/TestProject1/TestProject1/Log/TestProject1.mds.tcLogs index b66d659..77443cb 100644 --- a/TestProject1/TestProject1/Log/TestProject1.mds.tcLogs +++ b/TestProject1/TestProject1/Log/TestProject1.mds.tcLogs @@ -39,6 +39,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TestProject1/TestProject1/Script/cae_OSK.js b/TestProject1/TestProject1/Script/cae_OSK.js index a21b11d..92298f8 100644 --- a/TestProject1/TestProject1/Script/cae_OSK.js +++ b/TestProject1/TestProject1/Script/cae_OSK.js @@ -1,12 +1,15 @@ -function calcMoves(letter, old_x, old_y, new_x, new_y) -{ var LeftRight = UpDown = 0; +function calcMoves(old_x, old_y, new_x, new_y) +{ + var LeftRight = UpDown = 0; var move_str = '', space = ' ', LR = 'L,', UD = 'U,', Hash = '#,'; - switch (letter) - { - case space: - move_str = 'S,'; - break; - default: + /*setup algorithm as follows: + old_x and _y are the current cursor location + New_x and_y are the desired location + Mathematically determine distance in x and y directions, + - is up or left + + is down or right + use absolute value of difference to determine the number of U or D and L or R + */ LeftRight = new_x - old_x; UpDown = new_y - old_y; if(LeftRight < 0) LR = 'L,' @@ -26,23 +29,21 @@ count--; } move_str = move_str + Hash; - } return move_str; } function getSearchTerm(SearchTerm) -//retrieves a line from the file of Search Terms to be translated into cursor movements -//convert line to all upper case + +//convert SearchTerm line to all upper case //retrun the line to the calling program { - //var SearchTerm = 'IT Crowd'; - //var SearchTerm = 'abcdef ghijkl mnopqr stuvwx yz1234 567890'; SearchTerm = SearchTerm.toUpperCase(); return SearchTerm; } function main() { + //array of arrays to handle two dimensions of keyboard var keyboard = [ ["A","B","C","D","E","F"], ["G","H","I","J","K","L"], @@ -52,30 +53,44 @@ function main() ["5","6","7","8","9","0"] ]; - var inPath = "D:\\Source\\SearchTerm.txt"; - var outPath = "D:\\Source\\Keyboard.txt"; + var inPath = "D:\\cae_OnScreenKeyboard\\SearchTerm.txt"; + var outPath = "D:\\cae_OnScreenKeyboard\\Keyboard.txt"; // TestComplete function- opens the specified file for reading/writing - var inFile = aqFile.OpenTextFile(inPath, aqFile.faRead, aqFile.ctUTF8); + // I understand this is not part of web JavaScript implementations + // opens input file for readonly + var inFile = aqFile.OpenTextFile(inPath, aqFile.faRead, aqFile.ctANSI); + // opens output file for write only, if it does not exist, create it, if it does exist, overwrite it. var outFile = aqFile.OpenTextFile(outPath, aqFile.faWrite, aqFile.ctANSI, true); + var current_x, new_x, move_x, index_x, current_y, new_y, move_y, index_y; var cursor_str; var SearchTerm; + //Loop through file records, added extra test data while(! inFile.IsEndOfFile()){ + //Read it SearchTerm = inFile.ReadLine(); + //Capitalize it SearchTerm = getSearchTerm(SearchTerm); + + /*Assume the cursor will always start on the A when a new search is initiated + and the cursor string always starts out blank */ current_x = current_y = 0; cursor_str = ""; + for (var i = 0; i < SearchTerm.length; i++) { index_x = index_y = 0; - + //special case for the space which is not part of the keyboard array and does not affect the cursor position switch (SearchTerm.charAt(i)){ case " ": - cursor_str = cursor_str + calcMoves(SearchTerm.charAt(i), current_x, current_y, new_x, new_y); + //all entries except the last # tag need to be comma separated, so we will throw it in automatically + cursor_str = cursor_str + 'S,'; break; + + //anything else entered affects cursor location default: while (SearchTerm.charAt(i) != keyboard[index_y][index_x]) { @@ -86,21 +101,26 @@ function main() ++index_y } } - if (SearchTerm.charAt(i) == keyboard[index_y][index_x]) + /*if (SearchTerm.charAt(i) == keyboard[index_y][index_x]) { - Log.Message('Match Found SearchChar = ' + SearchTerm.charAt(i) + ' @index (y, x) (' + index_y + ', ' + index_x + ')') - } + //TestComplete logging contruct for debugging... + //Log.Message('Match Found SearchChar = ' + SearchTerm.charAt(i) + ' @index (y, x) (' + index_y + ', ' + index_x + ')') + } */ new_x = index_x; new_y = index_y; - cursor_str = cursor_str + calcMoves(SearchTerm.charAt(i), current_x, current_y, new_x, new_y); + cursor_str = cursor_str + calcMoves (current_x, current_y, new_x, new_y); current_x = new_x; current_y = new_y; } } - Log.Message(SearchTerm + " " + cursor_str); - //wacks of an unecessary ',' at the end of the string + //TestComplete logging contruct for debugging... + Log.Message(SearchTerm + " " + cursor_str); + + //wacks off an unecessary ',' at the end of the string cursor_str = cursor_str.substring(0, cursor_str.length - 1); + //makes sure the line is terminated correctly cursor_str = cursor_str + "\r\n"; + //and writes it out for posterity outFile.Write(cursor_str); } inFile.Close(); diff --git a/TestProject1/TestProject1/Script/cae_OSK.js.bak b/TestProject1/TestProject1/Script/cae_OSK.js.bak index cd42a31..f9bf202 100644 --- a/TestProject1/TestProject1/Script/cae_OSK.js.bak +++ b/TestProject1/TestProject1/Script/cae_OSK.js.bak @@ -1,12 +1,8 @@ -function calcMoves(letter, old_x, old_y, new_x, new_y) -{ var LeftRight = UpDown = 0; +function calcMoves(old_x, old_y, new_x, new_y) +{ + var LeftRight = UpDown = 0; var move_str = '', space = ' ', LR = 'L,', UD = 'U,', Hash = '#,'; - switch (letter) - { - case space: - move_str = 'S,'; - break; - default: + LeftRight = new_x - old_x; UpDown = new_y - old_y; if(LeftRight < 0) LR = 'L,' @@ -26,23 +22,21 @@ count--; } move_str = move_str + Hash; - } return move_str; } function getSearchTerm(SearchTerm) -//retrieves a line from the file of Search Terms to be translated into cursor movements -//convert line to all upper case + +//convert SearchTerm line to all upper case //retrun the line to the calling program { - //var SearchTerm = 'IT Crowd'; - //var SearchTerm = 'abcdef ghijkl mnopqr stuvwx yz1234 567890'; SearchTerm = SearchTerm.toUpperCase(); return SearchTerm; } function main() { + //array of arrays to handle two dimensions of keyboard var keyboard = [ ["A","B","C","D","E","F"], ["G","H","I","J","K","L"], @@ -52,30 +46,44 @@ function main() ["5","6","7","8","9","0"] ]; - var inPath = "D:\\Source\\SearchTerm.txt"; - var outPath = "D:\\Source\\Keyboard.txt"; + var inPath = "D:\\cae_OnScreenKeyboard\\SearchTerm.txt"; + var outPath = "D:\\cae_OnScreenKeyboard\\Keyboard.txt"; // TestComplete function- opens the specified file for reading/writing - var inFile = aqFile.OpenTextFile(inPath, aqFile.faRead, aqFile.ctUTF8); + // I understand this is not part of web JavaScript implementations + // opens input file for readonly + var inFile = aqFile.OpenTextFile(inPath, aqFile.faRead, aqFile.ctANSI); + // opens output file for write only, if it does not exist, create it, if it does exist, overwrite it. var outFile = aqFile.OpenTextFile(outPath, aqFile.faWrite, aqFile.ctANSI, true); + var current_x, new_x, move_x, index_x, current_y, new_y, move_y, index_y; var cursor_str; var SearchTerm; + //Loop through file records, added extra test data while(! inFile.IsEndOfFile()){ + //Read it SearchTerm = inFile.ReadLine(); + //Capitalize it SearchTerm = getSearchTerm(SearchTerm); + + /*Assume the cursor will always start on the A when a new search is initiated + and the cursor string always starts out blank */ current_x = current_y = 0; cursor_str = ""; + for (var i = 0; i < SearchTerm.length; i++) { index_x = index_y = 0; - + //special case for the space which is not part of the keyboard array and does not affect the cursor position switch (SearchTerm.charAt(i)){ case " ": - cursor_str = cursor_str + calcMoves(SearchTerm.charAt(i), current_x, current_y, new_x, new_y); + //all entries except the last # tag need to be comma separated, so we will throw it in automatically + cursor_str = cursor_str + 'S,'; break; + + //anything else entered affects cursor location default: while (SearchTerm.charAt(i) != keyboard[index_y][index_x]) { @@ -86,20 +94,26 @@ function main() ++index_y } } - if (SearchTerm.charAt(i) == keyboard[index_y][index_x]) + /*if (SearchTerm.charAt(i) == keyboard[index_y][index_x]) { - Log.Message('Match Found SearchChar = ' + SearchTerm.charAt(i) + ' @index (y, x) (' + index_y + ', ' + index_x + ')') - } + //TestComplete logging contruct for debugging... + //Log.Message('Match Found SearchChar = ' + SearchTerm.charAt(i) + ' @index (y, x) (' + index_y + ', ' + index_x + ')') + } */ new_x = index_x; new_y = index_y; - cursor_str = cursor_str + calcMoves(SearchTerm.charAt(i), current_x, current_y, new_x, new_y); + cursor_str = cursor_str + calcMoves (current_x, current_y, new_x, new_y); current_x = new_x; current_y = new_y; } } - Log.Message(SearchTerm + " " + cursor_str); + //TestComplete logging contruct for debugging... + Log.Message(SearchTerm + " " + cursor_str); + + //wacks off an unecessary ',' at the end of the string cursor_str = cursor_str.substring(0, cursor_str.length - 1); + //makes sure the line is terminated correctly cursor_str = cursor_str + "\r\n"; + //and writes it out for posterity outFile.Write(cursor_str); } inFile.Close(); From 513236deb0c2c78fe43ff25f20bb88b3f45b6f45 Mon Sep 17 00:00:00 2001 From: Charles Edwards Date: Tue, 6 Mar 2018 19:50:34 -0500 Subject: [PATCH 5/5] this file was missed in the final commit --- TestProject1/TestProject1.tcCfgExtender | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/TestProject1/TestProject1.tcCfgExtender b/TestProject1/TestProject1.tcCfgExtender index 54de67c..3f07c64 100644 --- a/TestProject1/TestProject1.tcCfgExtender +++ b/TestProject1/TestProject1.tcCfgExtender @@ -25,7 +25,7 @@ - + @@ -33,11 +33,11 @@ - + - - + + @@ -45,28 +45,28 @@ - + - + - + - - + + - +