Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
I am using the following article as a starting point. https://info.sapien.com/index.php/guis/ ... sive-loops
My code however, requires a foreach inside of another foreach similar to what is posted below. The $CancelLoop works as expected in "Loop 1" but does not work when processing the nested loop "Loop 2".
I answered my own question. adding another variable $canceled in "Loop 2" that gets evaluated at the start of "Loop 1" prevents the first loop from processing. Maybe there is a better command like exit in the inner loop to avoid that?
This topic is 4 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.