@aspiresys/visor 1.1.10 → 1.1.11
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.
- package/dist/index.d.ts +9 -0
- package/dist/index.js +13 -0
- package/dist/ocr.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -923,5 +923,14 @@ export declare class Visor {
|
|
|
923
923
|
* );
|
|
924
924
|
*/
|
|
925
925
|
execDetached(command: string): Promise<void>;
|
|
926
|
+
/**
|
|
927
|
+
* Pastes text using keyboard automation.
|
|
928
|
+
*
|
|
929
|
+
* @param text Text to paste.
|
|
930
|
+
*
|
|
931
|
+
* @example
|
|
932
|
+
* await visor.paste("Hello World");
|
|
933
|
+
*/
|
|
934
|
+
paste(text: string): Promise<void>;
|
|
926
935
|
}
|
|
927
936
|
export declare const visor: Visor;
|
package/dist/index.js
CHANGED
|
@@ -1211,6 +1211,19 @@ CONF:${m.confidence.toFixed(3)}
|
|
|
1211
1211
|
async execDetached(command) {
|
|
1212
1212
|
await (0, app_1.execDetached)(command);
|
|
1213
1213
|
}
|
|
1214
|
+
/**
|
|
1215
|
+
* Pastes text using keyboard automation.
|
|
1216
|
+
*
|
|
1217
|
+
* @param text Text to paste.
|
|
1218
|
+
*
|
|
1219
|
+
* @example
|
|
1220
|
+
* await visor.paste("Hello World");
|
|
1221
|
+
*/
|
|
1222
|
+
async paste(text) {
|
|
1223
|
+
await nut_js_1.clipboard.setContent(text);
|
|
1224
|
+
await this.sleep(100);
|
|
1225
|
+
await this.press(nut_js_1.Key.LeftControl, nut_js_1.Key.V);
|
|
1226
|
+
}
|
|
1214
1227
|
}
|
|
1215
1228
|
exports.Visor = Visor;
|
|
1216
1229
|
exports.visor = new Visor();
|
package/dist/ocr.js
CHANGED