Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sergiobaschi

macrumors regular
Original poster
Nov 30, 2012
199
6
Gothenburg, Sweden
Regarding the issues some 2013 MBA have dealing with brushes in Photoshop CS6 (mentioned here and here).

Given that Photoshop works when running 1280x800, I'm thinking of a ad hoc solution until Mavericks (which seems to solve the issue completely) is available for all.

I guess I could do it my self, but after trying for a few hours...

I'm thinking of an AppleScript that runs in the background, let's say every 5th second.

It checks if (A) Photoshop is running and (B) if the screen resolution is 1440x900.

If (A) and (B) are TRUE -> change screen resolution to 1280x800.
If (A) is TRUE and (B) is FALSE -> do nothing.
If (A) is false and (B) is TRUE -> do nothing.
If (A) and (B) are FALSE -> change screen resolution to 1440x900.

I've managed to change the screen resolution, but have problems with the "listening for open application"-code.

I assume there many of the people here are capable of writing this piece of code. It would surely help a lot of people until there is a more reliable solution.
 

kryten2

macrumors 65816
Mar 17, 2012
1,114
99
Belgium
Check to see if the application process is running.


Code:
tell application "System Events"
	if exists application process "Terminal" then
		say "Hello"
	end if
end tell
 

Attachments

  • Picture 9.png
    Picture 9.png
    60.1 KB · Views: 68
  • Picture 10.png
    Picture 10.png
    67.8 KB · Views: 94
Last edited:

meme1255

macrumors 6502a
Jul 15, 2012
742
594
Czechia
Only simplification: (written as C-like if , I don't know how to do multiple conditions in one if using AS, sorry)

Code:
If ( (A == 0) &&(B == A) ) -- change screen resolution to 1280x800.
If ( (A == 1) &&(B == A) ) -- change screen resolution to 1440x900.
--> You don't need to care about other states, but you can use else if you want to..

How to change resolution from terminal:
1) According to Apple disscussions impossible directly ---> :
// Found by google
Code:
--Open System Preferences on the Displays->Display tab
tell application "System Preferences"
   reveal anchor "displaysDisplayTab" of pane "com.apple.preference.displays"
   activate
end tell


Code:
  select row 2 of table 1 of scroll area 1 of group 1 of tab group 1 of window 1 of process "System Preferences" -- chooses resolution ;)

Try to put it together somehow :)
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.