从python(macosx10.7.3)运行applescript时遇到问题。实际上,我可以运行applescript,但是某个部分不起作用。特别是,我正在尝试单击应用程序中的菜单项:
args = ['osascript', '-e', 'tell app "StataMP" to activate']
args.extend(['-e', 'tell application "System Events" to tell application process "StataMP" to click menu item "run tmp file" of menu 1 of menu item "Applescript helpers" of menu 1 of menu bar item "User" of menu bar 1'])
subprocess.Popen(args)
我还尝试了一个更简单的版本来测试脚本,但没有成功:
^{pr2}$是的,“Enableaccessforassistivedevices”被启用了,我还试着禁用它并再次启用它(没有重新启动)。在
谢谢!在
目前没有回答
相关问题 更多 >
编程相关推荐