Move pages under tldr, lint run.sh, update docs

This commit is contained in:
2024-02-21 13:58:43 +02:00
parent 3d653cc7e6
commit 2c475fa62d
4806 changed files with 36 additions and 35 deletions

33
tldr/osx/osascript Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, osx]
source: https://github.com/tldr-pages/tldr.git
---
# osascript
> Run AppleScript or JavaScript for Automation (JXA).
> More information: <https://keith.github.io/xcode-man-pages/osascript.1.html>.
- Run an AppleScript command:
`osascript -e "{{say 'Hello world'}}"`
- Run multiple AppleScript commands:
`osascript -e "{{say 'Hello'}}" -e "{{say 'world'}}"`
- Run a compiled (`*.scpt`), bundled (`*.scptd`), or plaintext (`*.applescript`) AppleScript file:
`osascript {{path/to/apple.scpt}}`
- Get the bundle identifier of an application (useful for `open -b`):
`osascript -e 'id of app "{{Application}}"'`
- Run a JavaScript command:
`osascript -l JavaScript -e "{{console.log('Hello world');}}"`
- Run a JavaScript file:
`osascript -l JavaScript {{path/to/script.js}}`