# Can I check if OnParamChange was triggered by user input?

**URL:** <https://iplug2.discourse.group/t/can-i-check-if-onparamchange-was-triggered-by-user-input/657>\
**Category:** Uncategorized\
**Created:** [4 July 2022 21:20 UTC](https://iplug2.discourse.group/t/can-i-check-if-onparamchange-was-triggered-by-user-input/657 "2022-07-04T21:20:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShellyMinks](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@ShellyMinks](https://iplug2.discourse.group/u/ShellyMinks)\
**Post date:** [4 July 2022 21:20 UTC](https://iplug2.discourse.group/t/can-i-check-if-onparamchange-was-triggered-by-user-input/657/1 "2022-07-04T21:20:18Z")

</div>

I have some code that I want to run when a certain control (currently a IBSwitchControl) is changed. But I only want it to be triggered by actual user input, not when a DAW project is opened and the plugin loads. Since I was running this code from OnParamChange I was wondering if there is a way to check whether change was triggered by user input. Or maybe you can think of a better approach? Are action functions only triggered by user input?

BTW, if it matters, the code is changing other params and running onParamChange for those params

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![olilarkin](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olilarkin/32/2_2.png) [@olilarkin](https://iplug2.discourse.group/u/olilarkin)\
**Post date:** [5 July 2022 16:33 UTC](https://iplug2.discourse.group/t/can-i-check-if-onparamchange-was-triggered-by-user-input/657/2 "2022-07-05T16:33:57Z")

</div>

You can use the [EParamSource](https://iplug2.github.io/iPlug2/group___i_plug_constants.html#ga0ffe9e97c910636e31bad47d4877bc6e) argument of [OnParamChange()](https://iplug2.github.io/iPlug2/class_i_editor_delegate.html#a2a937fc0ea51cd6100a5be56a26dfba3) or [OnParamChangeUI()](https://iplug2.github.io/iPlug2/class_i_editor_delegate.html#a318f42e0744520eeedd2e21081979b4e)

---

<div class="post-metadata">

**Author:** ![olilarkin](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olilarkin/32/2_2.png) [@olilarkin](https://iplug2.discourse.group/u/olilarkin)\
**Post date:** [5 July 2022 16:35 UTC](https://iplug2.discourse.group/t/can-i-check-if-onparamchange-was-triggered-by-user-input/657/3 "2022-07-05T16:35:00Z")

</div>

> [@ShellyMinks](#):
>
> Are action functions only triggered by user input?

yes, that’s correct.
