|
hav Wanderer
Joined: 05 Oct 2004 Posts: 61 Location: Riga, Latvia
|
Posted: Fri Jan 20, 2006 5:16 am
#SS question |
I am trying to use insert javascript with #SS into zscript, I am trying to build true case statement with javascript without abusing #abort hack found on these forums. How do you properly encapsulate it so it doesnt take third line?
Code: |
#ECHO moo
#SS "JScript" {for (var x = 1; x <= 3; x++) {sess.ProcessCommand("#ECHO "+sess.ExpandStr("%1")+x)}}
#ECHO moo |
it always takes third line into #SS, "" or {} or '' or nothing
zmud 7.21 |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
|
|
|
hav Wanderer
Joined: 05 Oct 2004 Posts: 61 Location: Riga, Latvia
|
Posted: Tue Jan 31, 2006 5:23 pm |
interesting. said post uses no encapsulation, ;; to terminate first line, ; to terminate second line. If #SS has only have one line, it even sort of works.. halfway anyway. javascript gets executed, then the rest of zscript gets dropped and ignored. two lines of javascript flat out refuse to coexist with zscript, no matter how I tried to terminate or encapsulate them (including copy/pasting two-line example from that post).
My apologies, I didnt mean it as a trick question. I thought adding a couple lines of javascript to zscript would be trivial. It isnt that important or urgent, I can wait a few months for cmud with (hopefully) proper scripting support of a real language like perl. |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|