Ich möchte den aktuellen aktiven Tab in Chrome in einem neuen Fenster öffnen.
Die Absicht dabei, Tabs nebeneinander zu teilen (zur Verwendung mit BetterSnapTool).
Ich bin neu mit AppleScript und finde es etwas schwierig, dies zu lesen. Kann nicht wirklich von Methoden und Eigenschaften unterscheiden.
Dies funktioniert bei mir mit der neuesten Version von Mac OS High Sierra.
tell application "Google Chrome"
tell its window 1
set theURL to URL of active tab
close active tab
end tell
set the URL of active tab of (make new window) to theURL
end tell
Wenn Sie die beiden Fenster jetzt nebeneinander sehen möchten, versuchen Sie Folgendes ...
tell application "Finder"
set currentDesktopBounds to bounds of window of desktop
end tell
copy currentDesktopBounds to leftBounds
set l to item 3 of leftBounds
set l to l / 2 as integer
set item 3 of leftBounds to l
copy leftBounds to rightBounds
set r to item 3 of rightBounds as integer
set r to r + 1 as integer
set item 1 of rightBounds to r
set item 2 of rightBounds to 22
set item 3 of rightBounds to item 3 of currentDesktopBounds
set item 4 of rightBounds to item 4 of currentDesktopBounds
tell application "Google Chrome"
tell its window 1
set theURL to URL of active tab
close active tab
end tell
set the URL of active tab of (make new window) to theURL
delay 0.2
tell its window 1
set bounds to leftBounds
end tell
delay 0.2
tell its window 2
set bounds to rightBounds
end tell
end tell
Dzh
Fahrrad
wch1zpink
Fahrrad
wch1zpink