Skip to Main ContentWindow-Eyes  Braille Sense  CCTV  Voice Sense  SyncBraille  Support  Training
GW Micro - Unleashing the power of your mind's eye.
 

Zero Based vs. One Based VBScript Collections and Arrays - GWWiki

Jump to: navigation, search



One of the more frustrating things about VBScript is the discrepancy between data that is based on the first item starting at index 0 vs. the first item starting at index 1. To help alleviate that frustration, this article attempts to present a comprehensive collection of that data, and their starting indexes.


Contents

Objects

RegExp

  • Method: Execute
  • Returns: Collection (specifically a MatchCollection)
  • Starting Index: 0

Scripting.Dictionary

  • Method: Items
  • Returns: Array
  • Starting Index: 0

MSXML

  • Method: getElementsByTagName("blah")
  • Type: Collection
  • Starting Index: 0

Word.Application

  • Property: Documents
  • Type: Collection
  • Starting Index: 1

Word collections are generally 1-based.

Excel.Application

  • Property: Workbooks
  • Type: Collection
  • Starting Index: 1

Excel collections, like Word collections, are generally 1-based.

Window-Eyes Objects

Windows

  • Property: Item
  • Type: Window
  • Starting Index: 1

Keys

  • Property: Item
  • Type: Key
  • Starting Index: 0

ListviewItems

  • Property: Text
  • Type: ListViewItem
  • Starting Index: 1

VBScript Functions

Split

  • Returns: Array
  • Starting Index: 0

This page was last modified on 7 January 2010, at 02:37.

This page has been accessed 10,929 times.


Text Size:
Decrease Text Size Increase Text Size

Personal tools

Powered by MediaWiki
Public Domain
© 2013 GW Micro, Inc. All Rights Reserved.
GW Micro, Inc.    725 Airport North Office Park    Fort Wayne, IN 46825
Ph: 260-489-3671 Fax: 260-489-2608    www.gwmicro.com    sales@gwmicro.com    support@gwmicro.com
Hours: M-F, 8a-5p, EDST