Skip to main content

run applescript

Project description

Installation

$ [sudo] pip install applescript

Examples

>>> import applescript
>>> r = applescript.run('return 1')
>>> r = applescript.run('path/to/file.applescript')

>>> r.code
0
>>> r.out
'hello world'
>>> r.err
''

tell application "appname"

>>> applescript.tell.app("Terminal",'do script "ls"')
>>> applescript.tell.app("Terminal",'do script "ls"',background=True)

javascript (JXA)

>>> applescript.run('...',javascript=True)

readme42.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for applescript, version 2021.2.9
Filename, size File type Python version Upload date Hashes
Filename, size applescript-2021.2.9.tar.gz (2.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page