Unable to get it working without assistive access.
works with assistive scripteditor, not works with assistive terminal
Not a good practice to enable it on peoples computers who user your program.
tell application "Finder" | |
set desktopSize to bounds of window 1 | |
set widthval to ((item 3 of desktopSize) - (item 1 of desktopSize) - 33) | |
set heightval to ((item 4 of desktopSize) - (item 2 of desktopSize) - 33) | |
end tell | |
tell application "System Events" to tell (the first process whose unix id is 6728) | |
tell window 1 | |
set position to {0, 0} | |
end tell | |
tell window 2 | |
set position to {0, heightval} | |
end tell | |
tell window 3 | |
set position to {widthval, 0} | |
end tell | |
tell window 4 | |
set position to {widthval, heightval} | |
end tell | |
end tell |
/System/Library/Frameworks/ScreenSaver.framework/Resources/./ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -window -numWindows 4 -background & | |
vary=$(ps -A | grep /System/Library/Frameworks/ScreenSaver.framework/Res |rev | cut -c 144- | rev | cut -c 2-); | |
echo $vary; osascript -e " | |
tell application \"System Events\" to tell (the first process whose unix id is $vary) | |
tell window 0 | |
set position to {0, 0} | |
end tell | |
end tell | |
" |
/System/Library/Frameworks/ScreenSaver.framework/Resources/./ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -window -numWindows 4 -background & | |
vary=$(ps -A | grep /System/Library/Frameworks/ScreenSaver.framework/Res |rev | cut -c 144- | rev | cut -c 2-); | |
echo $vary; osascript -e " | |
tell application \"System Events\" to tell (the first process whose unix id is $vary) | |
tell window 1 | |
set position to {0, 0} | |
end tell | |
tell window 2 | |
set position to {0, heightval} | |
end tell | |
tell window 3 | |
set position to {widthval, 0} | |
end tell | |
tell window 4 | |
set position to {widthval, heightval} | |
end tell | |
end tell |