小编Jef*_*eff的帖子

使用Applescript打开多个窗口

我正在尝试编写一个Applescript来打开不同屏幕位置的三个VLC窗口.该脚本打开三个VLC实例,但将它们一个放在另一个上面(使用窗口1的位置).帮助代码赞赏:

do shell script "open -n /Applications/Video/VLC.app"
tell application "System Events"
    activate
    set bounds of first window of application "VLC" to {13, 36, 790, 519}
end tell

do shell script "open -n /Applications/Video/VLC.app"
tell application "System Events"
    activate
    set bounds of second window of application "VLC" to {13, 544, 790, 1027}
end tell

do shell script "open -n /Applications/Video/VLC.app"
tell application "System Events"
    activate
    set bounds of third window of application "VLC" to {13, 1043, 790, 1526}
end tell
Run Code Online (Sandbox Code Playgroud)

windows shell applescript

3
推荐指数
1
解决办法
1503
查看次数

标签 统计

applescript ×1

shell ×1

windows ×1