|
#1
| |||
| |||
|
How do I get the current screen resolution using applescript or the terminal?
|
|
#2
| |||
| |||
|
Hi rowoflo, You can get the screen resolution using code as follows: Code: set command to "/usr/sbin/system_profiler SPDisplaysDataType | grep Resolution"
set output to words of (do shell script command)
set {dspwidth, dspheight} to {item 2, item 4} of output
|
|
#3
| |||
| |||
|
Hey Martin, The /usr/sbin/system_profiler SPDisplaysDataType didn't work for me, I got file not found. But I did a little research and found that command has been replaced by system_profiler command. I used that and the rest of the code you posted and it worked out perfectly. Thanks for the help. After looking at your reply I have a new question. How did you put the code part of your reply in separate little window? I am very new to forums, actually my original question was the very first time I had ever posted to a forum. Thanks from Boston! |
|
#4
| |||
| |||
| Just surround your code with these tags: <code>code goes here</code>. You will have to replace the '<' and '>' characters with '[' and ']'. Or just hit the # icon in the message editor :-)
|
|
#5
| |||
| |||
|
Let's give it a try. Code: some code |
|
#6
| |||
| |||
|
Awesome! Thanks again.
|
![]() |
| Bookmarks |
| Tags |
| applescript, resolution, screen, size, terminal |
| Thread Tools | |
|
|