Module: AMS::Registry

Defined in:
Documentation/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 Also known as: remove

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


41
42
# File 'Documentation/ams/registry.rb', line 41

def delete(full_path, rel_to_su_reg_path = true)
end

.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


52
53
# File 'Documentation/ams/registry.rb', line 52

def get_keys(full_path, rel_to_su_reg_path = true)
end

.get_values(full_path, rel_to_su_reg_path = true) ⇒ Hash{String => Fixnum, 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 => Fixnum, Bignum, String})

    { value name => value_data, … }

Since:

  • 2.0.0


62
63
# File 'Documentation/ams/registry.rb', line 62

def get_values(full_path, rel_to_su_reg_path = true)
end

.read(full_path, rel_to_su_reg_path = true) ⇒ String, ... Also known as: get

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, Fixnum, Bignum, nil)

    Associated data or nil if the specified path is invalid.

Since:

  • 2.0.0


18
19
# File 'Documentation/ams/registry.rb', line 18

def read(full_path, rel_to_su_reg_path = true)
end

.write(full_path, value, rel_to_su_reg_path = true) ⇒ Boolean Also known as: set

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


30
31
# File 'Documentation/ams/registry.rb', line 30

def write(full_path, value, rel_to_su_reg_path = true)
end