[AHK] Write scripts with ChatGPT

Let ChatGPT write an object usage example of AutoHotkey language

source code

class Circle
{
  __New(radius)
  {
    this.radius := radius
  }
  GetArea()
  {
    return 3.14 * this.radius * this.radius
  }
  GetCircumference()
  {
    return 2 * 3.14 * this.radius
  }
}

circle:= new Circle(10)
area:= circle.GetArea()
circumference := circle.GetCircumference()
MsgBox,Circle s area is: %area% and circumference %circumference%

run output

Scheduled shutdown script

Guess you like

Origin blog.csdn.net/liuyukuan/article/details/128973199