Article ID: 125583 - Last Review: November 23, 2006 - Revision: 2.2 WD: AppleScript Example: Data Size CommandThis article was previously published under Q125583 On This PageSUMMARY
The information in this article discusses the following AppleScript event:
Data Size
This event is found in the Core Suite of Word's Event Dictionary.
MORE INFORMATIONMicrosoft provides programming examples for illustration only, without warranty either
expressed or implied, including, but not limited to, the implied warranties of
merchantability and/or fitness for a particular purpose. This article assumes
that you are familiar with the programming language being demonstrated and the
tools used to create and debug procedures. Microsoft support professionals can
help explain the functionality of a particular procedure, but they will not
modify these examples to provide added functionality or construct procedures to
meet your specific needs. If you have limited programming experience, you may
want to contact a Microsoft Certified Partner or the Microsoft fee-based
consulting line at (800) 936-5200. For more information about Microsoft Certified
Partners, please visit the following Microsoft Web site:
https://partner.microsoft.com/global/30000104
(https://partner.microsoft.com/global/30000104)
For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
(http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms)
The Core Suite contains events that a program should support to facilitate
easy, intuitive communications between the application and the system
software. System 7.0 was the first operating system to support these
events.
The Data Size command is used to get the size, in bytes, of an object. The result is displayed as an integer in "the result" window of AppleScript.
Data Size of 'something' [as 'type']
NOTE: The Data Size command cannot use some of the data types listed
above. The valid data types for the Data Size command are:
The As argument tells the Data Size command which data type to calculate the size for. The seven basic data types in AppleScript: Strings Numbers Integers Real Numbers Booleans Lists Records
Strings Real Numbers Lists ExampleThe following AppleScript script sample gets the data size, in bytes, of the selected object. This script does the following:
APPLIES TO
| Article Translations
|


Back to the top
