Add all the A tasks
This commit is contained in:
parent
2dd7375f96
commit
051504d65b
1608 changed files with 18584 additions and 0 deletions
28
Task/Abstract-type/AutoHotkey/abstract-type.ahk
Normal file
28
Task/Abstract-type/AutoHotkey/abstract-type.ahk
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
color(r, g, b){
|
||||
static color
|
||||
If !color
|
||||
color := Object("base", Object("R", r, "G", g, "B", b
|
||||
,"GetRGB", "Color_GetRGB"))
|
||||
return Object("base", Color)
|
||||
}
|
||||
Color_GetRGB(clr) {
|
||||
return "not implemented"
|
||||
}
|
||||
|
||||
waterColor(r, g, b){
|
||||
static waterColor
|
||||
If !waterColor
|
||||
waterColor := Object("base", color(r, g, b),"GetRGB", "WaterColor_GetRGB")
|
||||
return Object("base", WaterColor)
|
||||
}
|
||||
|
||||
WaterColor_GetRGB(clr){
|
||||
return clr.R << 16 | clr.G << 8 | clr.B
|
||||
}
|
||||
|
||||
test:
|
||||
blue := color(0, 0, 255)
|
||||
msgbox % blue.GetRGB() ; displays "not implemented"
|
||||
blue := waterColor(0, 0, 255)
|
||||
msgbox % blue.GetRGB() ; displays 255
|
||||
return
|
||||
Loading…
Add table
Add a link
Reference in a new issue