Adobe 65015634 Scripting Guide - Page 83

is defined as, This is the event ID for the New action. This action also needs to know

Page 83 highlights

CHAPTER 4: Action Manager Using ScriptListener to find event IDs and class IDs 83 6. The executeAction method for both of these actions takes an argument whose value is defined as "Mk ". (See id17 and id34.) This is the event ID for the "New" action. This action also needs to know what class to use, the class ID for the event. 7. The putObject method identifies the class the action operates on. The second argument to putObject provides us with the class ID that we need. In the first action, id33 is defined as "Dcmn", in the second action, id45 is defined as "Chnl". These provide our class IDs for Document and Channel, respectively. 8. You can now use these event and class IDs to set up event notification on the New Document and New Channel events from your scripts. In JavaScript, for example: var eventFile = new File(app.path + "/Presets/Scripts/Event Scripts Only/Welcome.jsx") app.notifiers.add("Mk ", eventFile, "Dcmn") app.notifiers.add("Mk ", eventFile, "Chnl")

  • 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

C
HAPTER
4: Action Manager
Using ScriptListener to find event IDs and class IDs
83
6.
The
executeAction
method for both of these actions takes an argument whose value is defined as
"Mk
"
. (See
id17
and
id34
.) This is the event ID for the “New” action. This action also needs to know
what class to use, the class ID for the event.
7.
The
putObject
method identifies the class the action operates on. The second argument to
putObject
provides us with the class ID that we need. In the first action,
id33
is defined as
"Dcmn"
, in
the second action,
id45
is defined as
"Chnl"
. These provide our class IDs for Document and Channel,
respectively.
8.
You can now use these event and class IDs to set up event notification on the New Document and
New Channel events from your scripts. In JavaScript, for example:
var eventFile = new File(app.path +
"/Presets/Scripts/Event Scripts Only/Welcome.jsx")
app.notifiers.add("Mk
", eventFile, "Dcmn")
app.notifiers.add("Mk
", eventFile, "Chnl")