Change settings when a specific program launches

Hello!
I am using KDE plasma 5.1.16 on manjaro. I would like to create a script that would enable this option when a specific program launches. And if possible, disable this option when the program closes. The reason is due to compatibility issues (this is a program running under WINE).

Is this possible?
Thank you!