Change screen resolution for Freehand

Please excuse my ignorance. I just started to “play” with AppleScript this morning. I am trying to write a script that will change the screen resolution when Freehand is opened, and change it back to 800x600 when Freehand is closed. The first half works, but I’m stuck on the rest.

Here’s what I have so far:

set screens to {screen size:{1024, 768}}

tell application “Finder”
activate
select package “Freehand MX.app” of folder “Macromedia Freehand MX” of folder “Applications (OS9)” of startup disk
open selection
end tell

Any suggestions would be greatly appreciated.

Thanks!

Here’s one possible solution. Add this to the end of your script and it will keep running while FreeHand is active - constantly checking to see if FH is active. Once it no longer shows up as active the script will exit the repeat and continue to change the resolution.

This may be a little bit of a resource hog but try it out and see if it works for you.


tell application "Finder" to set lisProc to the name of every process --get the name of every active process

repeat until lisProc does not contain "FreeHand 8.0.1"--change this to whatever FreeHand MX display's as in the app switcher (upper right hand side)
	tell application "Finder" to set lisProc to the name of every process
end repeat
set screens to {screen size:{800, 600}} --if the script exits the repeat then FH must not be active anymore

If you want to exit the script, without changing resolution bring it to the front and type command - period.

Good luck!

Works like a charm! Thanks!