home *** CD-ROM | disk | FTP | other *** search
/ PC Extra 07 & 08 / pca1507.iso / Software / psp8 / Data1.cab / ToggleCursors.PspScript < prev    next >
Encoding:
Text File  |  2003-04-22  |  1.8 KB  |  42 lines

  1. from JascApp import *
  2.  
  3. def ScriptProperties():
  4.     return {
  5.         'Author': 'Joe Fromm',
  6.         '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',
  7.         'Description': 'Toggle between precise cursors and show brush outlines.',
  8.         'Host': 'Paint Shop Pro 8',
  9.         'Host Version': '8.00'
  10.         }
  11.  
  12. def Do(Environment):
  13.     # start by getting the current set of preferences
  14.     CurrentPrefs = App.Do( Environment, 'ReturnGeneralPreferences' )
  15.  
  16.     # if brush outlines are on we will turn them off and turn on precise cursors.
  17.     if CurrentPrefs[ 'Display' ][ 'BrushOutlines' ] == App.Constants.Boolean.true:
  18.         print 'Turning brush outline on'
  19.         App.Do( Environment, 'GenPreferences', {
  20.                 'Display': {
  21.                     'PreciseCursors': App.Constants.Boolean.true, 
  22.                     'BrushOutlines': App.Constants.Boolean.false, 
  23.                     }, 
  24.                 'GeneralSettings': {
  25.                     'ExecutionMode': App.Constants.ExecutionMode.Silent, 
  26.                     'AutoActionMode': App.Constants.AutoActionMode.Match
  27.                     }
  28.                 })
  29.     else:   # if off then turn them on and turn precise off
  30.         print 'Turning brush outline off'
  31.         App.Do( Environment, 'GenPreferences', {
  32.                 'Display': {
  33.                     'PreciseCursors': App.Constants.Boolean.false, 
  34.                     'BrushOutlines': App.Constants.Boolean.true, 
  35.                     }, 
  36.                 'GeneralSettings': {
  37.                     'ExecutionMode': App.Constants.ExecutionMode.Silent, 
  38.                     'AutoActionMode': App.Constants.AutoActionMode.Match
  39.                     }
  40.                 })
  41.         
  42.