Page 1 of 1

Check of Checkboxes

Posted: Sat Aug 25, 2018 10:37 am
by boskap
Sorry for that title

i hafe a gui like an software installer where you can check checkboxes
press a start button
the tasks will run

but i want to popup a messagebox when all tasks are done
whats the best way

i think about to check of any checkbox is checked and when yes start messagebox
but how ?

thx Peter

Re: Check of Checkboxes

Posted: Sat Aug 25, 2018 10:47 am
by jvierra
[System.Windows.Forms.MessageBox]::Show('your message')

See: https://info.sapien.com/index.php/guis/ ... dlYm94Il0=

Re: Check of Checkboxes

Posted: Sat Aug 25, 2018 10:58 am
by boskap
how i make a messagebox i know

but i only want to show it after the tasks of software installation
so i must check if any checkbox is checked and when yes show the message box

how i check them all

Re: Check of Checkboxes

Posted: Sat Aug 25, 2018 11:50 am
by jvierra

Code: Select all

if($checkbox1.Checked){
      # box checked
}else{
     # bos not checked
}
See: https://info.sapien.com/index.php/guis/ ... ox-control

For most GUI items and usage check here: https://info.sapien.com/index.php/guis/gui-controls

Re: Check of Checkboxes

Posted: Sat Aug 25, 2018 2:19 pm
by boskap
thx
but thats also clear
so i install my software after press the startbutton

is it possible to check all at the same time with a variable

i dont want querry checkbox1, checkbox2 and......
i like if checkbox*.checked or so in this form then

thx

Re: Check of Checkboxes

Posted: Sat Aug 25, 2018 2:54 pm
by jvierra
That is not how Forms and PowerShell work.

Read the articles here: https://info.sapien.com/index.php/guis

Here is a good tutorial to get you started with PowerShell: https://mva.microsoft.com/en-us/trainin ... shell-8276