my_wins 1.1.7 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +8 -2
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -66,6 +66,7 @@ module.exports.run = async ()=>{
66
66
  baz:{no_run:true, cmd:"my command line 2"},
67
67
  webstorm: {app:true, cmd:"C:\\Program Files\\JetBrains\\WebStorm 2019.2\\bin\\webstorm64.exe"},
68
68
  }
69
+ delay:0,
69
70
  }
70
71
 
71
72
  optionally create my_wins_personal.json to override any settings
@@ -131,7 +132,7 @@ module.exports.run = async ()=>{
131
132
  let winIndex = 0;
132
133
  for(let k in settings.wins) {
133
134
  const w = settings.wins[k];
134
- const {name, title, app, cmd, no_run} = w;
135
+ const {name, title, app, cmd, no_run, delay} = w;
135
136
 
136
137
  let win_info_candidates = wins.filter(c => c.title.includes(title));
137
138
  const win_info = win_info_candidates[0];
@@ -145,8 +146,13 @@ module.exports.run = async ()=>{
145
146
  win.workwindow.setForeground();
146
147
 
147
148
  win.keyboard.printText(cmd);
148
- if(!no_run)
149
+ await awaitDelay(200);
150
+ if(!no_run) {
151
+ if(delay) {
152
+ await awaitDelay(delay);
153
+ }
149
154
  win.keyboard.sendKey(13);
155
+ }
150
156
  await awaitDelay(300);
151
157
  }
152
158
  winIndex++;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my_wins",
3
- "version": "1.1.7",
3
+ "version": "1.2.0",
4
4
  "description": "Automates starting and laying out your console windows for tsc, babel, tests, verdaccio, etc...",
5
5
  "keywords": ["automation","cmd","keysender","windows","autostart","autorun"],
6
6
  "main": "./index.js",