如何解决如何在typora中使用applescript导出markdown到html
我想使用Applescript在应用程序类型上重复对HTML导出标记降价的处理
我认为可以分为两部分
首先:单击导出为HTML 第二:选择目标目录,然后单击保存
但是我对第一步有疑问
tell application "System Events"
tell application "Typora"
open "path/to/my/markdown.md"
end tell
tell process "Typora"
click (menu item "HTML" of menu "export" of menu item "export" of menu "file" of menu bar item "file" of menu bar 1)
end tell
end tell
此代码无效。运行此脚本后没有弹出窗口(请我选择目标目录)
解决方法
这对我有用:
activate application "Typora"
delay 1
tell application "System Events"
tell process "Typora"
click (menu item "HTML" of menu "export" of menu item "export" of menu "file" of menu bar item "file" of menu bar 1)
delay 1
click button "Save" of sheet 1 of window 1
click button "Replace" of sheet 1 of sheet 1 of window 1
end tell
end tell
查找更多UI元素的有用命令是:entire contents of window 1
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。