home *** CD-ROM | disk | FTP | other *** search
Wrap
from JascApp import * def ScriptProperties(): return { 'Author': 'Joe Fromm', 'Copyright': 'Copyright (C) 2002-2003, Jasc Software Inc., All Rights Reserved. Permission to create derivate works of this script is granted provided this copyright notice is included', 'Description': 'Toggle between precise cursors and show brush outlines.', 'Host': 'Paint Shop Pro 8', 'Host Version': '8.00' } def Do(Environment): # start by getting the current set of preferences CurrentPrefs = App.Do( Environment, 'ReturnGeneralPreferences' ) # if brush outlines are on we will turn them off and turn on precise cursors. if CurrentPrefs[ 'Display' ][ 'BrushOutlines' ] == App.Constants.Boolean.true: print 'Turning brush outline on' App.Do( Environment, 'GenPreferences', { 'Display': { 'PreciseCursors': App.Constants.Boolean.true, 'BrushOutlines': App.Constants.Boolean.false, }, 'GeneralSettings': { 'ExecutionMode': App.Constants.ExecutionMode.Silent, 'AutoActionMode': App.Constants.AutoActionMode.Match } }) else: # if off then turn them on and turn precise off print 'Turning brush outline off' App.Do( Environment, 'GenPreferences', { 'Display': { 'PreciseCursors': App.Constants.Boolean.false, 'BrushOutlines': App.Constants.Boolean.true, }, 'GeneralSettings': { 'ExecutionMode': App.Constants.ExecutionMode.Silent, 'AutoActionMode': App.Constants.AutoActionMode.Match } })