Dreamweaver.getnaturalsize(), Dreamweaver.getsystemfontlist() – Adobe Dreamweaver API Reference CS5 User Manual
Page 470
465
DREAMWEAVER API REFERENCE
Code
Last updated 8/27/2013
Description
Determines whether the specified modifier key is depressed.
Arguments
key
•
The key argument must be one of the following values:
"Cmd"
,
"Ctrl"
,
"Alt"
, or
"Shift"
. In Windows,
"Cmd"
and
"Ctrl"
refer to the Control key; on the Macintosh,
"Alt"
refers to the Option key.
Returns
A Boolean value that indicates whether the key is pressed.
Example
The following code checks that both the Shift and Control keys (Windows) or Shift and Command keys (Macintosh)
are pressed before performing an operation:
if (dw.getKeyState("Shift") && dw.getKeyState("Cmd")){
// execute code
}
dreamweaver.getNaturalSize()
Availability
Dreamweaver 4.
Description
Returns the width and height of a graphical object.
Arguments
url
•
The url argument points to a graphical object for which the dimensions are wanted. Dreamweaver must support
this object (GIF, JPEG, PNG, Flash, and Shockwave). The URL that is provided as the argument to the
getNaturalSize()
function must be an absolute URL that points to a local file; it cannot be a relative URL.
Returns
An array of two integers where the first integer defines the width of the object, and the second defines the height.
dreamweaver.getSystemFontList()
Availability
Dreamweaver 4.
Description
Returns a list of fonts for the system. This function can get either all fonts or only TrueType fonts.