Ik zoek een manier om 1 van mijn beeldschermen te laten roteren in OSX door middel van een toetsen combinatie.
Ik had bedacht dat het met Applescript of Automator wel zou lukken, maar ik krijg het iedere keer net niet goed.
Ik heb een script gevonden die bijna doet wat ik wil, maar hij draait beide schermen.
Hoe krijg ik het voor elkaar dat hij alleen 1 van mijn schermen draait?
Misschien nog een probleem, mijn beeldschermen heten in System Preferences beide Syncmaster.
Wie kan mij helpen?
Edit:
Ik heb iemand gevonden die onderstaand script blijkbaar aangepast heeft naar wat ik wil.
Maar ik snap niet helemaal hoe hij dat gedaan heeft.
Hier is wat hij schrijft:
Ik had bedacht dat het met Applescript of Automator wel zou lukken, maar ik krijg het iedere keer net niet goed.
Ik heb een script gevonden die bijna doet wat ik wil, maar hij draait beide schermen.
Hoe krijg ik het voor elkaar dat hij alleen 1 van mijn schermen draait?
Misschien nog een probleem, mijn beeldschermen heten in System Preferences beide Syncmaster.
Wie kan mij helpen?
Edit:
Ik heb iemand gevonden die onderstaand script blijkbaar aangepast heeft naar wat ik wil.
Maar ik snap niet helemaal hoe hij dat gedaan heeft.
Hier is wat hij schrijft:
Hieronder het script wat ik gevonden had:Thanks for the script. I used it on my dual-monitor setup, and it rotated the first display twice. Each window is named the same as the name of the monitor, and since they are the same make/model number, it picked the same one twice.
I fixed that by using a numerical reference (1 or 2). The only trick is that the “confirm” command always goes to window #1, because as soon as you change the rotation, that display’s window becomes first.
Works like a charm now.
-- Set these to match your monitor's portrait and landscape modes
-- For example, on my monitor, Landscape mode is 'Standard' (item 1 in the rotate menu)
-- On my monitor, Portrait mode is '90°' (item 2 in the rotate menu)
property rotationDirectionLandscape : 1 -- rotate menu item 1 (Standard)
property rotationDirectionPortrait : 2 -- rotate menu item 2 (90 degrees)
-- the "main" part of the script
-- activate System Preferences
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.displays"
--reveal anchor "displaysDisplayTab" of pane "Displays"
end tell
-- get all the display preference pane windows
-- and rotate each corresponding display
set allDisplays to my getDisplays()
repeat with i from 1 to length of allDisplays
my setDisplay(i)
end repeat
-- this function gets a list of the display preferences windows.
-- needed if you have more than one display that you want to
-- rotate. Note: PowerBooks will not rotate their built-in
-- LCDs with this script.
on getDisplays()
tell application "System Events"
get properties
tell process "System Preferences"
set allDisplays to every window
end tell
end tell
return allDisplays
end getDisplays
-- This function simply clicks the pop-up button that
-- controls rotation, and selects the next in order
-- (either clockwise or counter-clockwise)
on setDisplay(thisDisplay)
set rotatable to false
tell application "System Events"
get properties
tell process "System Preferences"
tell window thisDisplay
tell tab group 1
click radio button "Display"
try
click pop up button 2 of group 1
tell pop up button 2 of group 1
repeat with i from 1 to 4
if selected of menu item i of menu 1 is true then
exit repeat
end if
end repeat
if i is equal to rotationDirectionLandscape then
-- is landscape now, switch to portrait mode
set rotateMenuItem to rotationDirectionPortrait
else
-- is not landscape now, switch to landscape
set rotateMenuItem to rotationDirectionLandscape
end if
click menu item rotateMenuItem of menu 1
end tell
-- If "Standard" is selected, no confirmation dialog is displayed.
if rotateMenuItem is not 1 then
set rotatable to true
end if
on error
log "Can't rotate display. It may be the laptop's built in display."
end try
end tell
end tell
if rotatable then
--delay 5
-- After rotation, for some reason the confirmation dialog is always in window 1.
set success to 0
repeat until success is equal to 1
try
tell window 1
tell sheet 1
click button "Confirm"
set success to 1
end tell
end tell
on error errText
log errText
delay 1
end try
end repeat
end if
end tell
end tell
end setDisplay
-- quit system preferences
tell application "System Preferences"
quit
end tell
[ Voor 11% gewijzigd door Mud.Starrr op 07-05-2010 22:47 ]
Trouwfotografie.nl
dekunstvanfotografie.nl
Sony A7RIII | A9
Sigma: 17 F4.0 || Sony: 25 F1.4 GM | 35 F1.4 GM | 50 F1.2 GM | 85 F1.8 | 100-400 F4.5-5.6 GM
DJI: Mavic 2 Zoom