Adobe 23101335 Scripting Guide - Page 73

Loading and storing selections, selRef.Store docRef.ChannelsMy Channel, psExtendSelection

Page 73 highlights

Scripting Photoshop 3 Selections 3.11.7 Loading and storing selections Scripting Support exposes the functionality to store and load selections. Selections get stored into channels and loaded from channels.The following examples will store the current selection into a channel named "My Channel" and extend the selection with any selection that is currently in that channel. AS: store selection of current document into channel "My Channel" of ¬ current document combination type extended VB: selRef.Store docRef.Channels("My Channel"), psExtendSelection JS: selRef.store(docRef.channels["My Channel"], SelectionType.EXTEND); To restore a selection that has been saved to a selection, use the load (Load/load) method as shown below. AS: load selection of current document from channel "My Channel" of ¬ current document combination type extended VB: selRef.Load docRef.Channels("My Channel"), psExtendSelection JS: selRef.load (docRef.channels["My Channel"], SelectionType.EXTEND); See section 3.16, "Clipboard interaction" on page 81 for examples on how to copy, cut and paste selections. Photoshop 7.0 Scripting Guide 73

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91

Photoshop 7.0 Scripting Guide
73
Scripting Photoshop
Selections
3
3.11.7 Loading and storing selections
Scripting Support exposes the functionality to store and load selections. Selections get stored
into channels and loaded from channels.The following examples will store the current
selection into a channel named “My Channel” and extend the selection with any selection that
is currently in that channel.
AS:
store selection of current document into channel "My Channel" of ¬
current document combination type extended
VB:
selRef.Store docRef.Channels("My Channel"), psExtendSelection
JS:
selRef.store(docRef.channels["My Channel"], SelectionType.EXTEND);
To restore a selection that has been saved to a selection, use the load (Load/load) method as
shown below.
AS:
load selection of current document from channel "My Channel" of ¬
current document combination type extended
VB:
selRef.Load docRef.Channels("My Channel"), psExtendSelection
JS:
selRef.load (docRef.channels["My Channel"], SelectionType.EXTEND);
See section
3.16, “Clipboard interaction” on page 81
for examples on how to copy, cut and
paste selections.