I find myself studying a little php to be able to maintain a web page. There is something that I have been working on that I would very much like to be able to do with AHK. I understand that they are different languages, but I can't find a better explanation of what I want to do.
How can I pass parameters and execute a function that I have inside a class
En php
Code: Select all
<?php
class Microondas {
function __construct($color, $potencia) {
$this->color = $color;
$this->potencia = $potencia;
}
function informacion() {
print("Un microondas de color: ".$this->color.", con potencia ".$this->potencia."<br><br>");
}
}
$m = new Microondas("verde", 10);
$m->informacion();
?>
Code: Select all
Class Speak
{
Str := "Null"
Hablar(Str)
{
This.Str := Str
MsgBox % Str
}
}
f3::
Texto := New Speak("Probando el uso de las clases")
% Texto.Hablar()
Return
Thanks in advance