Good afternoon,
I’m latelly strugling with my Forms script for a specific action I’d like to do, to help understanding, I’ll show part of codes while explaining.
I have 4 button that each show the exact same thing, we will name them ActionButton
$ButtonDL.Add_Click({ $FormInformationUserWindows.controls.AddRange(@($blocmail)) $blocmail.controls.AddRange(@($labelemail,$Textboxemail,$ButtonExport,$ButtonShow)) $ButtonExport.Add_click({ $Data = DL Exp})
In that button, another button is Added which we’ll call Buttonexport, uppon clicking on it, it will call a function into a variable and then another function that is a Forms.SaveFileDialog for saving the output of $Data
Issue here is when I click on another of ActionButton, then click on $ButtonExport, here what happens:
1- Script will firstly execute again the first ActionButton clicked on at the begining
2- Then script will execute the newly clicked ActionButton
If I click on a 3rd ActionButton , it will do exactly the 2 step above then will execute the action the 3rd ActionButton .
I tried clearing, closing or removing and adding anew the Buttonexport for every click performed on the ActionButton but it still keep in memory the first called function.
If someone have an idea of how this could be handled, that would very appreciated.
Thank you
Nad