When you unplug an external monitor with a higher resolution than your laptop, your MacBook, windows mostly Retains their width, but their size is cut at the (small) height of the MacBook screen when you plug the monitor again, their size is smaller than the disappointment.
My question is this: Is there any way I can repeat all the open windows again, save their size, and the monitor gets plugged again?
How the following Apple script shows:
- Loop
- Retrieve and change window status
- Retrieve and change the window size
Code:
Tell the application "system events" to process procedures to process processes to repeat processes with processes to count processes to repeat the process X to 1 Window window) Set window in window window Set window Set window size Set the size of window size Set the position of window Set x size for x {0, 0} {100 , 100} End Repeating End Repeat End Repeat End Note
Note: Script needs access to accessories (FAP):
"System Preferences" "Universal Access" " AccessoriesEdit (Comment to Reply)
Enabling Afad from AppleScipt may improve user experience, But this is the time when every script was executed, in case of Affair being disabled, only Afade enabled. There is no good practice to enable features without informing the user, allow the user to enable afad.
Example:
Shell script to enable Excel set "[-e \" / personal / var / db / AccessibilityAPIEnabled \ "] & amp; amp; and resonance \" yes \ "|| Resonance \" No \ "" If (accesseeship is equal to "no") then ask the correspondent to ask " Requires access. " Default button 2 set Answer the user returning from the user If the answer is equal to "OK" then the shell script ends with the other end administrator privileges from "touch / private / v / db /. AccessibilityAPIEnabled" if < / Code>
Comments
Post a Comment