Search found 103 matches

by cstevens
Tue Feb 20, 2018 5:56 pm
Forum: Applications
Topic: SmartStream Banner JDF
Replies: 19
Views: 28747

Re: SmartStream Banner JDF

You can set Banners and Dividers in the JDF configurator:

Image

Is there something other than what is currently available that you need to do?

Also note that Banner sheets are only supported on series 3 and 4 presses (7x00, 10,000, 12,000 etc.)
by cstevens
Tue Feb 06, 2018 11:08 pm
Forum: Flows
Topic: Using mjm for JDF pickup
Replies: 6
Views: 10520

Re: Using mjm for JDF pickup

Good to know. Thanks for sharing. Were you able to do it with the free version, or did you have to buy the Deluxe version?
by cstevens
Fri Jan 05, 2018 6:29 pm
Forum: Flows
Topic: Using mjm for JDF pickup
Replies: 6
Views: 10520

Re: Using mjm for JDF pickup

I know the HTTP component can create MIME packages, but I haven't seen anything in Switch that can extract the different components. It looks like there are some command-line utilities out there that you could possibly use with the Execute Command http://www.fpx.de/fp/Software/UUDeview/download/uude...
by cstevens
Tue Dec 19, 2017 11:54 pm
Forum: LEGACY scripting
Topic: SHA1 / SHA256 Message Authentication
Replies: 2
Views: 4234

Re: SHA1 / SHA256 Message Authentication

I had to create my HMAC hash in an external program and call that from Switch. Couldn't find a way in Switch to do it. It might be possible using ByteArray.generateSignature(), but it sounds like that was deprecated in 20017 Update 2. The lack of true JSON support and HMAC generation is making it di...
by cstevens
Wed Nov 15, 2017 5:19 pm
Forum: Flows
Topic: Extracting data from xml
Replies: 6
Views: 9714

Re: Extracting data from xml

You've got an extra closing tag at the end of your for-each opening tag:

Code: Select all

<xsl:for-each select="product"/>
should be:

Code: Select all

<xsl:for-each select="product">
If you get rid of that it should be valid.
by cstevens
Fri Nov 10, 2017 6:32 pm
Forum: Flows
Topic: Extracting data from xml
Replies: 6
Views: 9714

Re: Extracting data from xml

It would probably be easier to add product name values to an array like this: var xmlDoc = new Document(job.getPath()); var jobId = xmlDoc.evalToString("//job/id"); s.log(1, "JobID is: " + jobId); var productNames = xmlDoc.evalToNodes("//job/products/product/name"); var...
by cstevens
Fri Nov 10, 2017 6:17 pm
Forum: Flows
Topic: Extracting data from xml
Replies: 6
Views: 9714

Re: Extracting data from xml

How do you want the information saved? Do you want a new XML file with just that information in it, or are you trying to pull it into a script for use elsewhere? If you want a new XML file then an xsl transform is probably the easiest option. If the later then you can do something like this: var xml...
by cstevens
Wed Nov 08, 2017 7:17 pm
Forum: LEGACY scripting
Topic: replacechild
Replies: 9
Views: 12218

Re: replacechild

I'm not sure about his, but I think this is because you're using the same node to replace each of the 3 existing nodes, which effectively is moving the node to the last replacement you do. I think if you move the Node definition element inside your for loop then it will create a new node each time t...
by cstevens
Tue Nov 07, 2017 6:02 pm
Forum: LEGACY scripting
Topic: replacechild
Replies: 9
Views: 12218

Re: replacechild

I think this line is incorrect as well: nodeByPath.at(i).replaceChild(Node, nodeByPath); nodeByPath appears to be a NodeList, and the second parameter in the replaceChild function is expecting a Node. I think it needs to look something like this: nodeByPath.at(i).replaceChild(Node, nodeByPath.at(i)....
by cstevens
Sat Oct 21, 2017 12:58 am
Forum: LEGACY scripting
Topic: JDF/JMF Translator
Replies: 3
Views: 8753

Re: JDF/JMF Translator

What I did for the JDF configurator may not be the best for your application, but here are my recommendations: I recommend using property values in your scripts to populate the various fields you are sending to each press. Then you can use Switch's built-in XML/JDF pickups and path builder to do the...
by cstevens
Mon Oct 16, 2017 9:22 pm
Forum: Flows
Topic: XPATH formatting question
Replies: 9
Views: 138095

Re: XPATH formatting question

Basically you need to open the XML file as a document, then use an evaluation function to return the nodes: Something like this: var inXML = new Document(job.getPath()); var nodeList = inXML.evalToNodes("//PreflightResultEntry[@level='warning']", null); for (var i=0; i<nodeList.length; i++...
by cstevens
Mon Oct 16, 2017 6:30 pm
Forum: Flows
Topic: XPATH formatting question
Replies: 9
Views: 138095

Re: XPATH formatting question

This might be a limitation with Switch's implementation for variables. With the scripting module you can easily return multiple nodes found by an XPath and then loop through them to do formatting or whatever else, but in the variable GUI I was getting warnings that paths selecting multiple nodes wer...
by cstevens
Fri Oct 13, 2017 11:58 pm
Forum: Flows
Topic: XPATH formatting question
Replies: 9
Views: 138095

Re: XPATH formatting question

The structure of your XPath is a little odd. Are you missing the Root XML node in your XPath or does the XML look like this: <PreflightResultEntry level='warning'>Graphic element lies completely outside trim box (8x on page 1)Graphic element lies completely outside %BoxType%3108trim boxCheck</Prefli...
by cstevens
Tue Oct 10, 2017 9:33 pm
Forum: LEGACY scripting
Topic: reading folder on a mapped network drive - not work
Replies: 5
Views: 6136

Re: reading folder on a mapped network drive - not work

I'm not sure that's a valid call for an entry list. It should have 3 arguments like this: entryList( filter : String, filterSpec : Number, sortSpec : Number ) or in your code var FolderList = MyDir.entryList( "*.*", Dir.Files, Dir.Time); That would return all files sorted by modified date....
by cstevens
Fri Sep 15, 2017 4:43 pm
Forum: LEGACY scripting
Topic: sendToSingle() doesn't send until script finishes
Replies: 3
Views: 5725

Re: sendToSingle() doesn't send until script finishes

I believe you can also use s.copy() or s.move() to move files in the middle of the script, but that takes away a lot of Switch's built-in file handling which can be problematic.