how do I script 'right screen margin' in 7.0.5?

Steve Mills smills at multi-ad.com
Tue Sep 19 15:55:28 CDT 2006


On Sep 19, 2006, at 15:39:16, chris denesha wrote:

> We're running C7.0.5 on MAC OS9.2.2.
>
> I've created C7 preferences on one MAC and am using it across a  
> department where the screen resolution on each monitor can be  
> different.  I've set up an applescript that can be run on demand to  
> download the latest preferences (and default document).  In this  
> way corrupt prefs can be fixed without IT intervention, and it is  
> easy to roll out changes to prefs/default docs.
>
> My question is, how do I get C7 to automatically or  
> programmatically sense/apply the right margin setting so that it is  
> accurate for the screen resolution in place?  For example, if I  
> create a 100 pixel right margin at 1280 x 1024, and the user is  
> running 1024 x 768, the palettes are touching the right edge of the  
> screen.
>
> If I tell MultiAd Creator Pro to 'set right screen margin to 100',  
> launch C7, and open a blank document, the setting has not taken.   
> If I go into prefs and change the 100 pixels to 100, the app knows  
> there was no change and doesn't resize.  If I go into prefs and  
> change the 100 pixels to 101 pixels, the code to relocate the  
> palettes is run.
>
> I notice that I can programmatically set the margin and then change  
> the resolution for the monitor, and the palettes are relocated.  Is  
> there any other way to tell C7 to relocate the palettes?

I think the problem is that when you copy prefs from one machine to  
another, you're also copying the bounds of all the palettes. When  
Creator is launched and the palettes are being created, the bounds is  
loaded then constrained to the current screen resolution. So you need  
to force the palettes to know that they need to be arranged according  
to the current screen margins and the current screen resolution. Use  
the Arrange Palettes menu item:

tell application "MultiAd Creator Pro"
	activate
	set cmd to get command code of menu item "Arrange Palettes" of menu  
"View"
	do command cmd
end tell

Also, I hope your script that copies the prefs from one machine to  
another isn't being run from within Creator or while Creator is running.

_________________________________________________________
Steve Mills                              Me: 952-401-6255
Senior Software Architect                         MultiAd
smills at multiad.com                       www.multi-ad.com




More information about the Creator mailing list