![](templates/Classic/images/spacer.gif) |
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Mon Jan 12, 2009 5:42 am
LUA print in color |
How the heck do you print something in color in LUA in Cmud? The help files are weak.
|
|
|
![](templates/Classic/images/spacer.gif) |
Fang Xianfu GURU
![](images/avatars/1763170544a2093e7e85da.gif)
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Jan 12, 2009 6:27 am |
zs.show(zs.ansi("high","red") .. "lol!")
zs.show("<color 'red'>lol!</color>") |
|
|
![](templates/Classic/images/spacer.gif) |
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Mon Jan 12, 2009 8:06 am |
Ah I was trying to do:
print(zs.ansi("high","red") .. "lol!") |
|
|
![](templates/Classic/images/spacer.gif) |
oldguy2 Wizard
Joined: 17 Jun 2006 Posts: 1201
|
Posted: Mon Jan 12, 2009 5:17 pm |
Okay how do you do substitute in LUA?
I tried the follow:
zs.substitute("")
zs.cmd.substitute("")
Neither one works. |
|
|
![](templates/Classic/images/spacer.gif) |
Fang Xianfu GURU
![](images/avatars/1763170544a2093e7e85da.gif)
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Jan 13, 2009 3:12 am |
Both zs.substitute() and zs.sub() are working fine here.
|
|
|
![](templates/Classic/images/spacer.gif) |
|
|