Search found 4 matches
- Tue Mar 31, 2015 3:45 pm
- Forum: Scripting
- Topic: Send Switch Stat variables to JavaScript
- Replies: 10
- Views: 6865
Re: Send Switch Stat variables to JavaScript
The "Log" are just the messages in Switch ;) You are able to write into these messages with "job.log": job.log(1,"Hello world!"); The number "1" ist the message-type, so you are able to write Error-, Warning- oder just normal Info-Messages. 1 | Info (black) 2 ...
- Tue Mar 31, 2015 9:36 am
- Forum: Scripting
- Topic: Including files
- Replies: 8
- Views: 5502
Re: Including files
I did an experiment quite some time ago with reading a file and eval()-ing it: no luck, I could not get it to work. A simple javascript expression works, but when you start putting functions in it (which you will undoubtedly do) it does not work. You have to define the function as a variable! For e...
- Tue Mar 31, 2015 8:42 am
- Forum: Scripting
- Topic: Send Switch Stat variables to JavaScript
- Replies: 10
- Views: 6865
Re: Send Switch Stat variables to JavaScript
Code: Select all
Round([Switch.Calculation:Expression="[Stats.TrimBoxWidth]/2.83464"])
You could also use a script-expression so you can log your parameters:
Code: Select all
var width = Math.round(job.getVariableAsNumber("[Stats.TrimBoxWidth]")/2.83464);
job.log(2,"Width: %1", width);
width;
- Mon Mar 30, 2015 4:12 pm
- Forum: Scripting
- Topic: log messages
- Replies: 3
- Views: 2042
Re: log messages
In Switch 11 it was possible to have a really usefull Switch-Log: -2 | Assert -1 | Debug 1 | Info 2 | Warning 3 | Error 4 | Start 5 | Progress 6 | End But with Switch 12, the developer reduced the Log-Stats, so the "real-time-log" is absolutely useless. :evil: Hopefully, they will be imple...