Adobe 23101335 Scripting Guide - Page 13

Value type, What it is, Example, A list of values. Arrays

Page 13 highlights

Scripting basics 2 Values TABLE 2.2 Visual Basic Values Value type: What it is: Example: Boolean Logical true or false True Long Whole numbers (no decimal 14 points). Longs can be positive or negative. Double A number which may contain a decimal point. 13.9972 String A series of text characters. Strings appear inside (straight) quotation marks. "I am a string" Array A list of values. Arrays contain a single value type unless the type is defined as Variant. Array(10.0, 20.0, 30.0, 40.0) Object reference A specific reference to an object. appRef.ActiveDocument TABLE 2.3 JavaScript Values Value type: What it is: String A series of text characters. Strings appear inside (straight) quotation marks. Number Any number not inside double quotes. Boolean Logical true or false. Null Something that points to nothing. Object Properties and methods belonging to an object or array. Undefined Devoid of any value Example: "Hello" 3.7 true null activeDocument undefined Photoshop 7.0 Scripting Guide 13

  • 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
13
Scripting basics
Values
2
T
ABLE
2.2
Visual Basic Values
Value type:
What it is:
Example:
Boolean
Logical true or false
True
Long
Whole numbers (no decimal
points). Longs can be
positive or negative.
14
Double
A number which may
contain a decimal point.
13.9972
String
A series of text characters.
Strings appear inside
(straight) quotation marks.
"I am a string"
Array
A list of values. Arrays
contain a single value type
unless the type is defined as
Variant.
Array(10.0, 20.0, 30.0, 40.0)
Object reference
A specific reference to an
object.
appRef.ActiveDocument
T
ABLE
2.3
JavaScript Values
Value type:
What it is:
Example:
String
A series of text characters.
Strings appear inside
(straight) quotation marks.
"Hello"
Number
Any number not inside
double quotes.
3.7
Boolean
Logical true or false.
true
Null
Something that points to
nothing.
null
Object
Properties and methods
belonging to an object or
array.
activeDocument
Undefined
Devoid of any value
undefined