From d6d4da5df4ed7037ef3a59fad6177f9eb8fecbe8 Mon Sep 17 00:00:00 2001 From: Yann Bertrand <5855339+yannbertrand@users.noreply.github.com> Date: Mon, 20 Dec 2021 18:28:14 +0100 Subject: [PATCH] :bug: Add delay in commands --- record/dock/autohide-delay/0.5.js | 1 + record/dock/autohide-delay/0.js | 1 + record/dock/autohide-time-modifier/0.5.js | 1 + record/dock/autohide-time-modifier/0.js | 1 + record/dock/autohide-time-modifier/2.js | 1 + record/dock/orientation/bottom.js | 1 + record/dock/orientation/left.js | 1 + record/dock/orientation/right.js | 1 + 8 files changed, 8 insertions(+) diff --git a/record/dock/autohide-delay/0.5.js b/record/dock/autohide-delay/0.5.js index f8057e8..62debe8 100644 --- a/record/dock/autohide-delay/0.5.js +++ b/record/dock/autohide-delay/0.5.js @@ -46,6 +46,7 @@ module.exports = { // Action! await aperture.startRecording({ highlightClicks: true, cropArea }) + await delay(200) robot.moveMouseSmooth(pos2.x, pos2.y, 2) await delay(1000) robot.moveMouseSmooth(pos3.x, pos3.y, 5) diff --git a/record/dock/autohide-delay/0.js b/record/dock/autohide-delay/0.js index 2a16d2d..6965fa4 100644 --- a/record/dock/autohide-delay/0.js +++ b/record/dock/autohide-delay/0.js @@ -46,6 +46,7 @@ module.exports = { // Action! await aperture.startRecording({ highlightClicks: true, cropArea }) + await delay(200) robot.moveMouseSmooth(pos2.x, pos2.y, 2) await delay(1000) robot.moveMouseSmooth(pos3.x, pos3.y, 5) diff --git a/record/dock/autohide-time-modifier/0.5.js b/record/dock/autohide-time-modifier/0.5.js index 14db1cb..a87080d 100644 --- a/record/dock/autohide-time-modifier/0.5.js +++ b/record/dock/autohide-time-modifier/0.5.js @@ -46,6 +46,7 @@ module.exports = { // Action! await aperture.startRecording({ highlightClicks: true, cropArea }) + await delay(200) robot.moveMouseSmooth(pos2.x, pos2.y, 2) await delay(1000) robot.moveMouseSmooth(pos3.x, pos3.y, 5) diff --git a/record/dock/autohide-time-modifier/0.js b/record/dock/autohide-time-modifier/0.js index 966e17e..0a70dd1 100644 --- a/record/dock/autohide-time-modifier/0.js +++ b/record/dock/autohide-time-modifier/0.js @@ -46,6 +46,7 @@ module.exports = { // Action! await aperture.startRecording({ highlightClicks: true, cropArea }) + await delay(200) robot.moveMouseSmooth(pos2.x, pos2.y, 2) await delay(1000) robot.moveMouseSmooth(pos3.x, pos3.y, 5) diff --git a/record/dock/autohide-time-modifier/2.js b/record/dock/autohide-time-modifier/2.js index 2d4d04f..d780b73 100644 --- a/record/dock/autohide-time-modifier/2.js +++ b/record/dock/autohide-time-modifier/2.js @@ -46,6 +46,7 @@ module.exports = { // Action! await aperture.startRecording({ highlightClicks: true, cropArea }) + await delay(200) robot.moveMouseSmooth(pos2.x, pos2.y, 2) await delay(1000) robot.moveMouseSmooth(pos3.x, pos3.y, 5) diff --git a/record/dock/orientation/bottom.js b/record/dock/orientation/bottom.js index 901604d..0496165 100644 --- a/record/dock/orientation/bottom.js +++ b/record/dock/orientation/bottom.js @@ -14,6 +14,7 @@ module.exports = { '-string bottom', 'bottom', 'killall Dock' ) + .wait(1000) .captureScreen(`${outputPath}/bottom-tmp.png`) .deleteDefault('com.apple.dock', 'orientation', 'killall Dock') .run() diff --git a/record/dock/orientation/left.js b/record/dock/orientation/left.js index 40d379c..4e81792 100644 --- a/record/dock/orientation/left.js +++ b/record/dock/orientation/left.js @@ -14,6 +14,7 @@ module.exports = { '-string left', 'left', 'killall Dock' ) + .wait(1000) .captureScreen(`${outputPath}/left-tmp.png`) .deleteDefault('com.apple.dock', 'orientation', 'killall Dock') .run() diff --git a/record/dock/orientation/right.js b/record/dock/orientation/right.js index 6c8c02c..eff09f2 100644 --- a/record/dock/orientation/right.js +++ b/record/dock/orientation/right.js @@ -14,6 +14,7 @@ module.exports = { '-string right', 'right', 'killall Dock' ) + .wait(1000) .captureScreen(`${outputPath}/right-tmp.png`) .deleteDefault('com.apple.dock', 'orientation', 'killall Dock') .run()