Module: AMS::Registry

Defined in:
docs/ams/registry.rb

Overview

Note:

Windows only!

The Registry namespace contains functions associated with Windows registry.

Since:

  • 2.0.0

Class Method Summary collapse

Class Method Details

.delete(full_path, rel_to_su_reg_path = true) ⇒ Boolean

Delete registry key or value.

Parameters:

  • full_path (String)
  • rel_to_su_reg_path (Boolean) (defaults to: true)

    Whether to acquire path relative to the registry path of the current SketchUp application or from the beginning.

Returns:

  • (Boolean)

    success

Since:

  • 2.0.0

.get(full_path, rel_to_su_reg_path = true) ⇒ String, ...

Get data associated with the registry path.

Examples:

Read registry relative to base root:

read('HKEY_CURRENT_USER/Environment/TEMP', false)

Read registry relative to SketchUp registry path:

read('Application/RunCounterSU', true)

Parameters:

  • full_path (String)
  • rel_to_su_reg_path (Boolean) (defaults to: true)

    Whether to acquire path relative to the registry path of the current SketchUp application or from the beginning.

Returns:

  • (String, Integer, Bignum, nil)

    Associated data or nil if the specified path is invalid.

Since:

  • 2.0.0

.get_keys(full_path, rel_to_su_reg_path = true) ⇒ Array<String>

Get all keys or 'folders' found in the specified registry path.

Parameters:

  • full_path (String)
  • rel_to_su_reg_path (Boolean) (defaults to: true)

    Whether to acquire path relative to the registry path of the current SketchUp application or from the beginning.

Returns:

  • (Array<String>)

Since:

  • 2.0.0

.get_values(full_path, rel_to_su_reg_path = true) ⇒ Hash{String => Integer, Bignum, String}

Get all values or 'files' and their data found in the specified registry path.

Parameters:

  • full_path (String)
  • rel_to_su_reg_path (Boolean) (defaults to: true)

    Whether to acquire path relative to the registry path of the current SketchUp application or from the beginning.

Returns:

  • (Hash{String => Integer, Bignum, String})

    { value name => value_data, ... }

Since:

  • 2.0.0

.set(full_path, value, rel_to_su_reg_path = true) ⇒ Boolean

Set data associated with the registry path.

Parameters:

  • full_path (String)
  • value (Object)
  • rel_to_su_reg_path (Boolean) (defaults to: true)

    Whether to acquire path relative to the registry path of the current SketchUp application or from the beginning.

Returns:

  • (Boolean)

    success

Since:

  • 2.0.0