Search found 106 matches
- Fri Oct 13, 2017 11:58 pm
- Forum: Flows
- Topic: XPATH formatting question
- Replies: 9
- Views: 145981
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...
- Tue Oct 10, 2017 9:33 pm
- Forum: LEGACY scripting
- Topic: reading folder on a mapped network drive - not work
- Replies: 5
- Views: 8393
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....
- Fri Sep 15, 2017 4:43 pm
- Forum: LEGACY scripting
- Topic: sendToSingle() doesn't send until script finishes
- Replies: 3
- Views: 7365
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.
- Mon Sep 11, 2017 11:28 pm
- Forum: LEGACY scripting
- Topic: search replace regex help
- Replies: 6
- Views: 12220
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.
- Mon Sep 11, 2017 6:15 pm
- Forum: LEGACY scripting
- Topic: search replace regex help
- Replies: 6
- Views: 12220
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");
var inputString = "1 AZ SPOCS _ IP NTF-signed.pdf";
inputString = inputString.replace(/^\d{1,2}(?=\s)/, inputString.match(/^\d{1,2}(?=\s)/) + ".0");
- Fri Sep 01, 2017 9:33 pm
- Forum: LEGACY scripting
- Topic: Clean up filenames from XML
- Replies: 4
- Views: 26595
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.
- Thu Aug 17, 2017 4:59 pm
- Forum: LEGACY scripting
- Topic: InDesign Smartstream Create Job Script
- Replies: 11
- Views: 18093
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?
- Wed Aug 09, 2017 10:45 pm
- Forum: Flows
- Topic: Gang jobs from multiple tickets
- Replies: 3
- Views: 6276
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...
- Tue Aug 08, 2017 4:33 pm
- Forum: Flows
- Topic: Gang jobs from multiple tickets
- Replies: 3
- Views: 6276
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?
- 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: 20765
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...
- 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: 20765
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...
- Wed May 17, 2017 8:34 pm
- Forum: Flows
- Topic: How to define an unique XML-Path
- Replies: 4
- Views: 9441
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.
[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.
- Fri Mar 17, 2017 5:34 pm
- Forum: Flows
- Topic: Assemble Job and HP SmartStream error
- Replies: 1
- Views: 3613
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...
- Thu Feb 16, 2017 6:27 pm
- Forum: LEGACY scripting
- Topic: amend XML file [solved]
- Replies: 5
- Views: 10263
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...
- Thu Feb 09, 2017 5:03 pm
- Forum: Flows
- Topic: Dropbox Settings
- Replies: 3
- Views: 8112
Re: Dropbox Settings
I'm not sure if the HTTP element uses SSL or not, that would be a possible hangup.