applescript-utils
Advanced tools
Comparing version 0.1.11 to 0.1.12
@@ -9,3 +9,3 @@ export type { ElementPathPart } from './types/element.js'; | ||
export { getTableRows, selectTableRow } from './utils/table.js'; | ||
export { setTextFieldValue } from './utils/text-field.js'; | ||
export { getTextFieldValue, setTextFieldValue } from './utils/text-field.js'; | ||
export { waitForWindow } from './utils/window.js'; |
@@ -8,3 +8,3 @@ export { toggleCheckbox } from './utils/checkbox.js'; | ||
export { getTableRows, selectTableRow } from './utils/table.js'; | ||
export { setTextFieldValue } from './utils/text-field.js'; | ||
export { getTextFieldValue, setTextFieldValue } from './utils/text-field.js'; | ||
export { waitForWindow } from './utils/window.js'; |
{ | ||
"name": "applescript-utils", | ||
"version": "0.1.11", | ||
"version": "0.1.12", | ||
"description": "Utilities for AppleScript scripts.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
import type { BaseElementReference } from '../utils/element-reference.js'; | ||
export declare function setTextFieldValue(element: BaseElementReference, text: string): Promise<void>; | ||
export declare function getTextFieldValue(element: BaseElementReference): Promise<void>; |
@@ -12,1 +12,10 @@ import { outdent } from 'outdent'; | ||
} | ||
export async function getTextFieldValue(element) { | ||
await runAppleScript(outdent ` | ||
tell application "System Events" | ||
tell process ${JSON.stringify(element.applicationProcess)} | ||
get value of ${element.pathString} | ||
end tell | ||
end tell | ||
`); | ||
} |
Sorry, the diff of this file is not supported yet
100438
2806