Run Multiple functions from an onclick event

Welcome Forums General PowerShell Q&A Run Multiple functions from an onclick event

This topic contains 1 reply, has 2 voices, and was last updated by

1 year, 7 months ago.

  • Author
  • #74308

    Points: 64
    Rank: Member

    I have a form created in Powershell 5 and when I click it it calls a function called getupdates. I have several other functions on the form that I would like to run once the getupdates function has completed i.e. when I click Start it runs getupdates then another function and when that has finished it runs another function etc. Any ideas how I can run multiple functions from one onclick event ? Do I need to put them in a scriptbocl and call that in the onclick event ? If so how do I do this?

    $Buttonst = New-Object System.Windows.Forms.Button
    $Buttonst.Location = New-Object System.Drawing.Size(400,100)
    $Buttonst.Size = New-Object System.Drawing.Size(110,80)
    $Buttonst.Text = "Start"

  • #74317

    Points: 1
    Rank: Member

    You could call a Function which calls the others, I think that would be more organized.

The topic ‘Run Multiple functions from an onclick event’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort