ArcPad Scripting Object Model
WriteProfileInt Method
See Also  Example  Send comments on this topic.
Section
Required. A String that specifies the Section containing the entry. If the section does not exist, it is created.
Entry
Required. A String that contains the Entry into which the value is to be written. If the entry does not exist in the specified section, it is created.
Value
Required. A Long that specifies the Value to be written.
Application Object : WriteProfileInt Method

Glossary Item Box

Description

Writes the specified value into the specified section in the ArcPad.ini file (on desktop Windows) or ArcPad's registry entry (on Windows CE).

Syntax

object.WriteProfileInt ( Section, Entry, Value )

Parameters

Section
Required. A String that specifies the Section containing the entry. If the section does not exist, it is created.
Entry
Required. A String that contains the Entry into which the value is to be written. If the entry does not exist in the specified section, it is created.
Value
Required. A Long that specifies the Value to be written.

Return Type

Boolean

Remarks

The return value indicates whether the specified value was successfully written to the specified section in the ArcPad.ini file (True) or not (False).

Example

ApplicationProfile stores and retrieves entries in ArcPad's application profile.
Application Example (VBScript)Copy Code
Sub ApplicationProfile
  Dim strSection, strStringItem, strIntItem
  strSection = "My Section"
  strStringItem = "My String Item"
  strIntItem = "My Int Item"

  'Write a string value to ArcPad.ini
  Call Application.WriteProfileString(strSection, strStringItem, "test")

  'Retrieve the string value
  Dim strValue
  strValue = Application.GetProfileString(strSection, strStringItem)
  'Display the value retrieved
  MsgBox strValue

  'Write an integer value to ArcPad.ini
  Call Application.WriteProfileInt(strSection, strIntItem, 60)

  'Retrieve the integer value
  Dim intValue
  intValue =Application.GetProfileInt(strSection, strIntItem)
  'Display the value retrieved
  MsgBox intValue
End Sub

See Also

© 2012 All Rights Reserved.