1101x1 最近的时间轴更新
1101x1

1101x1

V2EX 第 392069 号会员,加入于 2019-03-14 11:32:48 +08:00
1101x1 最近回复了
on findLastTargetIndex(targetItem, itemList)
set lastIndex to 0
repeat with i from (count of itemList) to 1 by -1
if item i of itemList is targetItem then
set lastIndex to i
exit repeat
end if
end repeat
return lastIndex
end findLastTargetIndex
beep 1
beep 1
tell application "System Settings"
activate
delay 1
tell application "System Events"
tell process "System Settings"
click menu item "显示器" of menu "显示" of menu bar item "显示" of menu bar 1
delay 0.3
tell group 1 of group 2 of splitter group 1 of group 1 of window "显示器"
try
delay 1
-- 这里需要延迟,因为系统设置冷启动后不能立刻加载出右侧的界面
click pop up button "添加"
-- 获取所有菜单项的名称
set menuItems to name of menu items of menu "添加" of pop up button "添加"
-- 通过名字查找要准确一些,这里去找最后一个名字的索引,因为如果符合通用控制的调节,就会出现两个名字,一个是通用控制,一个是随航
set targetIndex to (my findLastTargetIndex("XXXXXXXX 的 iPad", menuItems))
-- 点击目标菜单项
delay 0.3
click menu item targetIndex of menu "添加" of pop up button "添加"
say "连接成功"
on error
delay 0.5
say "连接失败"
end try
end tell
end tell
end tell
end tell
delay 1
beep 1
--tell application "System Settings" to quit
我也网上找的 自动操作 然后用的鼠标手势 划一下就自动连接了 你自己找找看 或 trae 改改
10 天前
回复了 q534 创建的主题 Apple 有什么办法让 mac 保留“镜像或拓展至 iPad ”吗
applescript
还有这个拖拽打开链接插件 Drag and Drop to Open URL 也挺好用
macstroke 全局手势 好用
28 天前
回复了 Dosenf 创建的主题 iPhone XDM,避雷爱回收
你看抖音上那么多某瓜 某转的广子 哪来的钱
不是 Mac 版 找了一圈看图还是这个 jdpurcell/qView 最快最爽
网上找一圈 ai 也试了 不行 请教
![Imgur]( https://imgur.com/a/hWJrQkO)
45 天前
回复了 movq 创建的主题 Apple 如何看待 M4 Mac mini 侠
公正侠
挺好用的
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5804 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 16ms · UTC 02:11 · PVG 10:11 · LAX 19:11 · JFK 22:11
Developed with CodeLauncher
♥ Do have faith in what you're doing.