[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ns-do-applescript
From: |
Howard Melman |
Subject: |
Re: ns-do-applescript |
Date: |
Wed, 25 May 2022 09:57:40 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (darwin) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Daniel Martín [2022-05-24 22:00:12] wrote:
>> I don't object delegating to osascript as a subprocess, but there are
>> probably lots of packages and user customizations already calling
>> ns-do-applescript. We should deprecate the API before removing it, and
>> the deprecation message should tell people how they can call osascript
>> in an equivalent way.
>
> Can we re-implement `ns-do-applescript` as an ELisp function that runs
> `osascript`?
I do use it for simple interaction with the Finder and Safari such as:
(do-applescript "tell application \"Safari\" to get the name of window 1")
(do-applescript "tell application \"Safari\" to get the URL of document 1")
Part of the value of do-applescript is that it returns the
output as a string. Quickly playing with call-process and
osascript isn't quite as trivial but I'm sure is doable.
--
Howard
- ns-do-applescript, Po Lu, 2022/05/23
- Re: ns-do-applescript, Filipp Gunbin, 2022/05/23
- Re: ns-do-applescript, Po Lu, 2022/05/23
- Re: ns-do-applescript, Daniel Martín, 2022/05/24
- Re: ns-do-applescript, Stefan Monnier, 2022/05/24
- Re: ns-do-applescript,
Howard Melman <=
- Re: ns-do-applescript, Richard Stallman, 2022/05/26
- Re: ns-do-applescript, Howard Melman, 2022/05/26
- Re: ns-do-applescript, Andreas Schwab, 2022/05/26
- Re: ns-do-applescript, Howard Melman, 2022/05/26
- Re: ns-do-applescript, Andreas Schwab, 2022/05/26
- Re: ns-do-applescript, Richard Stallman, 2022/05/26
- Re: ns-do-applescript, Po Lu, 2022/05/26
- Re: ns-do-applescript, Richard Stallman, 2022/05/27
- Re: ns-do-applescript, Po Lu, 2022/05/27
- Re: ns-do-applescript, Richard Stallman, 2022/05/29