jham77
01-16-2007, 01:32 AM
Dear XSI users.....
I am getting into scripting and sure it speeds up my overall workflow.
However since my scripting level is purely at "copy-paste-edit",
sometimes I am going nowhere but wasting time.
For instance I couldn't figure out the folowing.
Here is what I want to achive with this script
1) setup user input and set it as variable oValue
2) simple math (oValue + 12)
3) print the result
I typed in 12 as my input and if I scripted correctly,
I should get 24 right? (12+12=24)
Yes, VBS is fine but Jscript is returning weird result.
Can anybody please have a look at it and teach me
what I am doing wrong?
[VBS]
oValue = XSIInputBox( "How many?", "?", "0.0" )
z = oValue + 12
LogMessage z
' INFO : 24
[Jscript]
var oValue = XSIInputBox( "How many?", "?", "0.0" );
var z = oValue+12
LogMessage (z)
// INFO : 1212
12+12 = 1212 ???
why...???
I am getting into scripting and sure it speeds up my overall workflow.
However since my scripting level is purely at "copy-paste-edit",
sometimes I am going nowhere but wasting time.
For instance I couldn't figure out the folowing.
Here is what I want to achive with this script
1) setup user input and set it as variable oValue
2) simple math (oValue + 12)
3) print the result
I typed in 12 as my input and if I scripted correctly,
I should get 24 right? (12+12=24)
Yes, VBS is fine but Jscript is returning weird result.
Can anybody please have a look at it and teach me
what I am doing wrong?
[VBS]
oValue = XSIInputBox( "How many?", "?", "0.0" )
z = oValue + 12
LogMessage z
' INFO : 24
[Jscript]
var oValue = XSIInputBox( "How many?", "?", "0.0" );
var z = oValue+12
LogMessage (z)
// INFO : 1212
12+12 = 1212 ???
why...???
