# HandleToInt(handle)

Source: https://help.malighting.com/grandMA3/2.3/HTML/lua_objectfree_handletoint.html
This is grandocs, an unofficial mirror of MA Lighting documentation. For authoritative or safety-relevant information, cite the canonical page on help.malighting.com.

---
## Description

The **HandleToInt** Lua function converts a handle into an integer format.

See the [Handle topic](/grandma3/2-3/lua_handle/) for more info regarding handles and links to other related functions.

## Arguments

- **Handle**:\
  The handle of the object.

## Return

- **Integer**:\
  The returned integer is the handle converted to an integer.

## Example

This example prints the handle integer number for the selected sequence. It also converts the integer back to a handle and uses this to print the name of the sequence:

|                                                                                                                                             |
| ------------------------------------------------------------------------------------------------------------------------------------------- |
| [Copy Code](javascript:void\(0\))Lua                                                                                                        |
| ```
return function()
    Printf("The integer number for the handle of the selected sequence: %i", HandleToInt(SelectedSequence()))
end
``` |