Search found 103 matches

by cstevens
Mon Sep 11, 2017 11:28 pm
Forum: LEGACY scripting
Topic: search replace regex help
Replies: 6
Views: 8941

Re: search replace regex help

Sorry, I don't know how to do that. You may have better luck if you post this in the Flows forum.
by cstevens
Mon Sep 11, 2017 6:15 pm
Forum: LEGACY scripting
Topic: search replace regex help
Replies: 6
Views: 8941

Re: search replace regex help

Probably a more elegant way to do this but:

var inputString = "1 AZ SPOCS _ IP NTF-signed.pdf";
inputString = inputString.replace(/^\d{1,2}(?=\s)/, inputString.match(/^\d{1,2}(?=\s)/) + ".0");
by cstevens
Fri Sep 01, 2017 9:33 pm
Forum: LEGACY scripting
Topic: Clean up filenames from XML
Replies: 4
Views: 9432

Re: Clean up filenames from XML

You could open it as a standard file and do a simple string.replace(/&/g, '&'), then save the file and send it to an XML pickup for further processing. I did something similar for corrupted csv files.
by cstevens
Thu Aug 17, 2017 4:59 pm
Forum: LEGACY scripting
Topic: InDesign Smartstream Create Job Script
Replies: 11
Views: 11900

Re: InDesign Smartstream Create Job Script

That's basically what the HP SmartStream Designer VDP Configurator does. Is there something you want to do that can't be handled by the configurator?
by cstevens
Wed Aug 09, 2017 10:45 pm
Forum: Flows
Topic: Gang jobs from multiple tickets
Replies: 3
Views: 4955

Re: Gang jobs from multiple tickets

You'll probably want to focus on sorting the XML files based on some kind of information inside them. To do this I'd look at two elements in Switch: 1. Assemble Job - Assemble job can group files based on file name patterns, or numbers in files which should encapsulate orders with the series you lis...
by cstevens
Tue Aug 08, 2017 4:33 pm
Forum: Flows
Topic: Gang jobs from multiple tickets
Replies: 3
Views: 4955

Re: Gang jobs from multiple tickets

How are the jobs coming into Switch? Is there some type of metadata file (i.e. XML) that has all the information about these files that comes with the PDF?
by cstevens
Thu May 25, 2017 4:58 pm
Forum: LEGACY scripting
Topic: Fails on Mac but works on Windows (thats hard for me to say)
Replies: 12
Views: 13779

Re: Fails on Mac but works on Windows (thats hard for me to say)

Maybe a silly question, but is the outgoing connection(s) from the script set up as a stop light connection with a valid data connection? That undefined message could possibly be due to the sendToData not being a valid output location. Based on the documentation this should throw an error message, b...
by cstevens
Thu May 25, 2017 4:02 pm
Forum: LEGACY scripting
Topic: Fails on Mac but works on Windows (thats hard for me to say)
Replies: 12
Views: 13779

Re: Fails on Mac but works on Windows (thats hard for me to say)

This line doesn't seem right to me: var theDestPath = job.createPathWithName(job.getNameProper(), false) + "." + ext; // create a temp spot to copy You're creating a temp location and then adding an extension to the variable that references the location, so when you send files to that loca...
by cstevens
Wed May 17, 2017 8:34 pm
Forum: Flows
Topic: How to define an unique XML-Path
Replies: 4
Views: 7367

Re: How to define an unique XML-Path

replace the node index [7] with something unique to that node. For example:

[Metadata.Text:Path="/field-list/field[@Id='spMF_7_3']/value",Dataset="Submit",Model="XML"]

That way the order of the elements doesn't matter.
by cstevens
Fri Mar 17, 2017 5:34 pm
Forum: Flows
Topic: Assemble Job and HP SmartStream error
Replies: 1
Views: 3098

Re: Assemble Job and HP SmartStream error

I know the output to the ganging configurator is a traffic light connection, and you need to have at least one connection coming out that carries types of Data. In the working flow I had I believe I set one connection coming out and set the "Carry jobs of this type" to "Data and Log&q...
by cstevens
Thu Feb 16, 2017 6:27 pm
Forum: LEGACY scripting
Topic: amend XML file [solved]
Replies: 5
Views: 7950

Re: amend XML file

Once you have the file opened as a DOM you can use: Document.evalToString() / .evalToNumber() / evalToBoolean() functions to get the data you want: var isbn = doc.evalToString("/Books/Book/Publisher/@ISBN", null); If you search in the Switch Scripter help for "Evaluating XPath" t...
by cstevens
Thu Feb 09, 2017 5:03 pm
Forum: Flows
Topic: Dropbox Settings
Replies: 3
Views: 6074

Re: Dropbox Settings

I'm not sure if the HTTP element uses SSL or not, that would be a possible hangup.
by cstevens
Thu Feb 09, 2017 5:01 pm
Forum: Flows
Topic: Dropbox Settings
Replies: 3
Views: 6074

Re: Dropbox Settings

If you look at the documentation in the Scripting help for HTTP it shows how to do this in the scripting interface: function jobArrived( s : Switch, job : Job ) { var theHTTP = new HTTP( HTTP.SSL ); theHTTP.authScheme = HTTP.OauthAuth; theHTTP.authorization = "authorization string"; theHTT...
by cstevens
Wed Feb 08, 2017 9:40 pm
Forum: Flows
Topic: Create contact sheet
Replies: 5
Views: 6051

Re: Create contact sheet

I know the SmartStream Designer Ganging configurator can take a folder of PDF files that are all the same size and gang them based on a selected imposition template (you might need to remove the Source jpegs folder first), but it might be easier to use the Assemble job step to create one large PDF c...
by cstevens
Wed Feb 08, 2017 9:03 pm
Forum: Flows
Topic: Create contact sheet
Replies: 5
Views: 6051

Re: Create contact sheet

Can you give some more detail about what this Contact Sheet will contain content-wise?