Anonymous user
Send an unknown method call: Difference between revisions
→{{header|AutoHotkey}}: AutoHotkey example
m (omissions) |
(→{{header|AutoHotkey}}: AutoHotkey example) |
||
Line 7:
* [[Runtime evaluation]]
=={{header|AutoHotkey}}==
This object has 3 methods, and asks the user to name one to call. Instead of using Func(), one could use a class definition.
<lang AHK>obj := {mA: Func("mA"), mB: Func("mB"), mC: Func("mC")}
InputBox, methodToCall, , Which method should I call?
obj[methodToCall].()
mA(){
MsgBox Method A
}
mB(){
MsgBox Method B
}
mC(){
MsgBox Method C
}
</lang>
=={{header|E}}==
|