You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

请求编写AppleScript实现GeekTool图片显示/隐藏切换功能

实现GeekTool图片显示/隐藏一键切换的AppleScript方案

直接通过判断语句就能实现一键切换,核心逻辑是先获取目标图片组件的当前可见状态,再反向设置它的visible属性。

tell application "GeekTool"
    -- 替换成你在GeekTool里给图片组件设置的实际名称
    set targetWidget to widget "滤镜状态提示"
    if visible of targetWidget is true then
        set visible of targetWidget to false
    else
        set visible of targetWidget to true
    end if
end tell

注意事项

  • 务必把代码里的"滤镜状态提示"换成你实际的图片组件名称,这个名称可以在GeekTool偏好设置的对应图片项里找到
  • 保存这段脚本为.scpt文件后,可用脚本编辑器直接运行,也可以通过Automator、Alfred等工具绑定快捷键,实现真正的一键触发

内容的提问来源于stack exchange,提问作者Robert Meyer

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.10 18:31:08