Difference between revisions of "Lua:registerFormAddNotification"
Jump to navigation
Jump to search
(Created page with "Category:Lua '''function''' registerFormAddNotification(''Callback'') ''':''' Object Registers a function to be called whenever a form is added to Cheat Engine's form lis...") |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 4: | Line 4: | ||
Registers a function to be called whenever a form is added to Cheat Engine's form list. | Registers a function to be called whenever a form is added to Cheat Engine's form list. | ||
This is useful for extensions that add new functionality to certain existing forms. | This is useful for extensions that add new functionality to certain existing forms. | ||
| − | Returns an object that can be used with [[unregisterFormAddNotification]] to remove the notification. | + | Returns an object that can be used with [[Lua:unregisterFormAddNotification]] to remove the notification. |
===Function Parameters=== | ===Function Parameters=== | ||
| Line 29: | Line 29: | ||
== See also == | == See also == | ||
| − | * [[unregisterFormAddNotification]] | + | * [[Lua:unregisterFormAddNotification]] |
Latest revision as of 00:11, 11 July 2025
function registerFormAddNotification(Callback) : Object
Registers a function to be called whenever a form is added to Cheat Engine's form list. This is useful for extensions that add new functionality to certain existing forms. Returns an object that can be used with Lua:unregisterFormAddNotification to remove the notification.
Function Parameters[edit]
| Parameter | Type | Description |
|---|---|---|
| Callback | Function | A function that takes one parameter (the form object) and is called when a form is added. |
Examples[edit]
-- Print the class name of every form that gets added
local notif = registerFormAddNotification(function(form)
print("Form added: " .. (form.ClassName or "Unknown"))
end)
-- Later, you can unregister the notification:
unregisterFormAddNotification(notif)